Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

UnicodeDecodeError: invalid_start_byte #623

Open
Natim opened this issue Jan 15, 2016 · 8 comments
Open

UnicodeDecodeError: invalid_start_byte #623

Natim opened this issue Jan 15, 2016 · 8 comments
Labels

Comments

@Natim
Copy link
Contributor

Natim commented Jan 15, 2016

{"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/

@Natim
Copy link
Contributor Author

Natim commented Jan 15, 2016

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)

@leplatrem leplatrem added the bug label Jan 22, 2016
@leplatrem
Copy link
Contributor

Any idea how to reproduce ? Should we close and wait for a second occurence ?

@tarekziade
Copy link
Contributor

Closing until next occurence

@Natim
Copy link
Contributor Author

Natim commented Jul 26, 2016

New occurence.

@Natim Natim reopened this Jul 26, 2016
@Natim
Copy link
Contributor Author

Natim commented Jul 26, 2016

Apparently it is a bug in Pyramid. We can reproduce quite easily with every Cliquet related projects :(

@Natim
Copy link
Contributor Author

Natim commented Jul 26, 2016

And probably cornice and pyramid projects too...

@Natim
Copy link
Contributor Author

Natim commented Jul 26, 2016

This is a fix in Kinto: https://github.com/Kinto/kinto/pull/740/files (Which should be backported for Syncto in cliquet)

@Natim
Copy link
Contributor Author

Natim commented Jul 26, 2016

I have created an issue in Pyramid: Pylons/pyramid#2725

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants