Issue #388 resolved

Encoding error when loading file with non ansii name

Ishayahu Lastov
created an issue


You got encoding error when you try to load content to page form file with non ansii name

Steps to reproduce

  1. Make new wiki
  2. Make new page
  3. Try to load content from file with non ansii name, for example "Телефония в МЕОЦ"
  4. You got error

Comments (5)

  1. Roger Haase

    Fixed by ecf5a2e34ec7. Was able to reproduce at tip - 155 changesets. No failure at current tip. #438 is a dup of this issue

    Traceback from TEMP.7z:

    Traceback (most recent call last):
      File "/usr/home/ishayahu/venv-moin-new-python/lib/python2.7/site-packages/flask/", line 1836, in __call__
        return self.wsgi_app(environ, start_response)
      File "/usr/home/ishayahu/venv-moin-new-python/lib/python2.7/site-packages/flask/", line 1820, in wsgi_app
        response = self.make_response(self.handle_exception(e))
      File "/usr/home/ishayahu/venv-moin-new-python/lib/python2.7/site-packages/flask/", line 1403, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/usr/home/ishayahu/venv-moin-new-python/lib/python2.7/site-packages/flask/", line 1817, in wsgi_app
        response = self.full_dispatch_request()
      File "/usr/home/ishayahu/venv-moin-new-python/lib/python2.7/site-packages/flask/", line 1477, in full_dispatch_request
        rv = self.handle_user_exception(e)
      File "/usr/home/ishayahu/venv-moin-new-python/lib/python2.7/site-packages/flask/", line 1381, in handle_user_exception
        reraise(exc_type, exc_value, tb)
      File "/usr/home/ishayahu/venv-moin-new-python/lib/python2.7/site-packages/flask/", line 1475, in full_dispatch_request
        rv = self.dispatch_request()
      File "/usr/home/ishayahu/venv-moin-new-python/lib/python2.7/site-packages/flask/", line 1461, in dispatch_request
        return self.view_functions[rule.endpoint](**req.view_args)
      File "/usr/home/ishayahu/moin-new/MoinMoin/apps/frontend/", line 541, in modify_item
        return item.do_modify()
      File "/usr/home/ishayahu/moin-new/MoinMoin/items/", line 831, in do_modify
        self.modify(meta, data, comment, contenttype_guessed, **{CONTENTTYPE: contenttype_qs})
      File "/usr/home/ishayahu/moin-new/MoinMoin/items/", line 461, in modify
        return self._save(meta, data, contenttype_guessed=contenttype_guessed, comment=comment)
      File "/usr/home/ishayahu/moin-new/MoinMoin/items/", line 593, in _save
        item_modified.send(app, item_name=name, action=action)
      File "/usr/home/ishayahu/venv-moin-new-python/lib/python2.7/site-packages/blinker/", line 267, in send
        for receiver in self.receivers_for(sender)]
      File "/usr/home/ishayahu/moin-new/MoinMoin/util/", line 212, in send_notifications
        subscribers = {subscriber for subscriber in get_subscribers(**meta) if
      File "/usr/home/ishayahu/moin-new/MoinMoin/util/", line 42, in get_subscribers
        for name_ in name)
      File "/usr/home/ishayahu/moin-new/MoinMoin/util/", line 42, in <genexpr>
        for name_ in name)
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-8: ordinal not in range(128)
  2. Log in to comment