Skip to content

Instantly share code, notes, and snippets.

@hirokiky
Created June 16, 2015 00:55
Show Gist options
  • Save hirokiky/54e03d993463d46dbdd1 to your computer and use it in GitHub Desktop.
Save hirokiky/54e03d993463d46dbdd1 to your computer and use it in GitHub Desktop.
Error when updating contents which name is as Unicode.
2015-06-16 09:42:09,565 ERROR [waitress][Dummy-4] Exception when serving /manage/terms/ティ/@@properties
Traceback (most recent call last):
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/waitress/channel.py", line 337, in service
task.service()
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/waitress/task.py", line 173, in service
self.execute()
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/waitress/task.py", line 392, in execute
app_iter = self.channel.server.application(env, start_response)
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/pyramid-1.6a1-py3.4.egg/pyramid/router.py", line 223, in __call__
response = self.invoke_subrequest(request, use_tweens=True)
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/pyramid-1.6a1-py3.4.egg/pyramid/router.py", line 198, in invoke_subrequest
response = handle_request(request)
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/pyramid_debugtoolbar-2.4-py3.4.egg/pyramid_debugtoolbar/toolbar.py", line 178, in toolbar_tween
return handler(request)
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/pyramid-1.6a1-py3.4.egg/pyramid/tweens.py", line 20, in excview_tween
response = handler(request)
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/pyramid_tm-0.12-py3.4.egg/pyramid_tm/__init__.py", line 99, in tm_tween
reraise(*exc_info)
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/pyramid_tm-0.12-py3.4.egg/pyramid_tm/compat.py", line 15, in reraise
raise value
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/pyramid_tm-0.12-py3.4.egg/pyramid_tm/__init__.py", line 87, in tm_tween
manager.commit()
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/transaction-1.4.4-py3.4.egg/transaction/_manager.py", line 111, in commit
return self.get().commit()
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/transaction-1.4.4-py3.4.egg/transaction/_transaction.py", line 280, in commit
reraise(t, v, tb)
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/transaction-1.4.4-py3.4.egg/transaction/_compat.py", line 56, in reraise
raise value
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/transaction-1.4.4-py3.4.egg/transaction/_transaction.py", line 271, in commit
self._commitResources()
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/transaction-1.4.4-py3.4.egg/transaction/_transaction.py", line 417, in _commitResources
reraise(t, v, tb)
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/transaction-1.4.4-py3.4.egg/transaction/_compat.py", line 56, in reraise
raise value
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/transaction-1.4.4-py3.4.egg/transaction/_transaction.py", line 394, in _commitResources
rm.tpc_vote(self)
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/ZODB-4.2.0-py3.4.egg/ZODB/Connection.py", line 786, in tpc_vote
s = vote(transaction)
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/ZODB-4.2.0-py3.4.egg/ZODB/FileStorage/FileStorage.py", line 717, in tpc_vote
self._file.write(h.asString())
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/ZODB-4.2.0-py3.4.egg/ZODB/FileStorage/format.py", line 287, in asString
return b"".join(map(as_bytes, [s, self.user, self.descr, self.ext]))
File "/home/hirokiky/dev/deepthought/env/lib/python3.4/site-packages/ZODB-4.2.0-py3.4.egg/ZODB/utils.py", line 90, in as_bytes
return str(obj).encode("ascii")
UnicodeEncodeError: 'ascii' codec can't encode characters in position 14-15: ordinal not in range(128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment