Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.3.11rc1] ETag calculation for main view can't handle unicode plugin template vars #3088

foosel opened this issue Mar 28, 2019 · 1 comment


None yet
1 participant
Copy link

commented Mar 28, 2019


  1. Install Cost plugin
  2. Restart & Reload:
2019-03-28 11:47:25,543 - octoprint - ERROR - Exception on / [GET]
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/oprint/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/oprint/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/oprint/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/oprint/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/server/", line 199, in index
    enable_timelapse] + sorted(["{}:{}".format(k, v) for k, v in _plugin_vars.items()])
UnicodeEncodeError: 'ascii' codec can't encode character u'\u20ac' in position 0: ordinal not in range(128)


Use unicode instead of str for ETag parts.

@foosel foosel self-assigned this Mar 28, 2019

foosel added a commit that referenced this issue Mar 28, 2019

🐛 Fix for plugin vars that contain unicode
ETag calculation could otherwise fall flat on its face.

Fixes #3088

@foosel foosel added this to the 1.3.11 milestone Mar 29, 2019


This comment has been minimized.

Copy link
Owner Author

commented Apr 4, 2019

1.3.11rc2 was just released

@foosel foosel closed this Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.