cliquet
cliquet copied to clipboard
UnicodeDecodeError: invalid_start_byte
{"Pid":11823,"EnvVersion":"2.0","Hostname":"ip-172-31-22-215","Timestamp":1452819351327000000,"Fields":{"lang":"en","exception":"Traceback (most recent call last):\\n File \\"~\\/pyramid\\/tweens.py\\", line 20, in excview_tween\\n response = handler(request)\\n File \\"~\\/pyramid_tm\\/__init__.py\\", line 101, in tm_tween\\n reraise(*exc_info)\\n File \\"~\\/pyramid_tm\\/__init__.py\\", line 83, in tm_tween\\n response = handler(request)\\n File \\"~\\/pyramid\\/router.py\\", line 78, in handle_request\\n has_listeners and notify(NewRequest(request))\\n File \\"~\\/pyramid\\/registry.py\\", line 91, in notify\\n [ _ for _ in self.subscribers(events, None) ]\\n File \\"~\\/zope\\/interface\\/registry.py\\", line 328, in subscribers\\n return self.adapters.subscribers(objects, provided)\\n File \\"~\\/zope\\/interface\\/adapter.py\\", line 596, in subscribers\\n subscription(*objects)\\n File \\"~\\/pyramid\\/config\\/adapters.py\\", line 103, in derived_subscriber\\n return subscriber(arg[0])\\n File \\"~\\/cliquet\\/initialization.py\\", line 346, in on_new_request\\n path=event.request.path,\\n File \\"~\\/webob\\/request.py\\", line 486, in path\\n bpath = bytes_(self.path_info, self.url_encoding)\\n File \\"~\\/webob\\/descriptors.py\\", line 68, in fget\\n return req.encget(key, encattr=encattr)\\n File \\"~\\/webob\\/request.py\\", line 178, in encget\\n return val.decode(encoding)\\n File \\"\\/data\\/syncto\\/lib64\\/python2.7\\/encodings\\/utf_8.py\\", line 16, in decode\\n return codecs.utf_8_decode(input, errors, True)\\nUnicodeDecodeError: \'utf8\' codec can\'t decode byte 0x80 in position 1: invalid start byte","code":307,"uid":null,"errno":null,"querystring":"{}","agent":"Mozilla\\/5.0 [en] (X11, U; OpenVAS 7.0.5)","method":"GET","t":0,"time":"2016-01-15T00:55:50","path":"\\/webtools\\/control\\/main","authn_type":null},"Logger":"syncto","Type":["utf8","\\/\x80..\\/\x80..\\/\x80..\\/\x80..\\/\x80..\\/\x80..\\/\x80..\\/\x80..\\/boot.ini",1,2,"invalid start byte"],"Severity":2}
https://sentry.prod.mozaws.net/operations/syncto/group/206744/
This is related to this code:
# New logger context, with infos for request summary logger.
logger.new(agent=request.headers.get('User-Agent'),
path=event.request.path,
method=request.method,
querystring=dict(request.GET),
uid=request.authenticated_userid,
lang=request.headers.get('Accept-Language'),
authn_type=getattr(request, 'authn_type', None),
errno=None)
Any idea how to reproduce ? Should we close and wait for a second occurence ?
Closing until next occurence
New occurence.
Apparently it is a bug in Pyramid. We can reproduce quite easily with every Cliquet related projects :(
And probably cornice and pyramid projects too...
This is a fix in Kinto: https://github.com/Kinto/kinto/pull/740/files (Which should be backported for Syncto in cliquet)
I have created an issue in Pyramid: https://github.com/Pylons/pyramid/pull/2725