"Internal Server Error" when page name has non-ASCII symbols

Bug #1698784 reported by Aino Neko on 2017-06-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

When run Zim Web server, the pages non-pure-ASCII symbols lead to "Internal Server Error" displayed in browser.

Version of zim: 0.66 and above (I have tried 0.66 and 0.67-rc2).
With version 0.65 this error did not happen.

How to reproduce:
create sub-page with name "Français" (note the "c with cedilla"), run server, click the page.

The relevant messages from zim -D:

ERROR: Unexpected error:
Traceback (most recent call last):
  File "/home/neko/work/_misc/zim-desktop-wiki/zim/www.py", line 226, in __call__
    path = self.notebook.pages.lookup_from_user_input(pagename)
  File "/home/neko/work/_misc/zim-desktop-wiki/zim/notebook/index/pages.py", line 652, in lookup_from_user_input
    source, href, ignore_link_placeholders=False)
  File "/home/neko/work/_misc/zim-desktop-wiki/zim/notebook/index/pages.py", line 325, in resolve_link
    return self.resolve_pagename(ROOT_PATH, href.parts())
  File "/home/neko/work/_misc/zim-desktop-wiki/zim/notebook/index/pages.py", line 405, in resolve_pagename
    page_id, pagename, branch = self._resolve_pagename(parent, names)
  File "/home/neko/work/_misc/zim-desktop-wiki/zim/notebook/index/pages.py", line 435, in _resolve_pagename
    (page_id, "%:"+basename)
ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings. - - [19/Jun/2017 17:17:16] "GET /Home/Fran%C3%A7ais.html HTTP/1.1" 500 21

DEBUG: Python version is sys.version_info(major=2, minor=7, micro=9, releaselevel='final', serial=0)
DEBUG: Platform is posix

$uname -a
Linux venus 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux
$ lsb_release -d
Description: BunsenLabs GNU/Linux 8.7 (Hydrogen)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers