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

mishandling of encodings on redirect #3712

Closed
ewdurbin opened this issue Apr 16, 2018 · 1 comment
Closed

mishandling of encodings on redirect #3712

ewdurbin opened this issue Apr 16, 2018 · 1 comment

Comments

@ewdurbin
Copy link
Member

reproduce:

make serve

once warehouse is up locally

curl http://localhost/pypi/%E2%98%83/json/

view error in logs:

web_1            | 2018-04-16T17:36:56+0000 [-] WSGI application error
web_1            |     Traceback (most recent call last):
web_1            |       File "/opt/warehouse/lib/python3.6/site-packages/twisted/python/threadpool.py", line 266, in <lambda>
web_1            |         inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
web_1            |       File "/opt/warehouse/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext
web_1            |         return self.currentContext().callWithContext(ctx, func, *args, **kw)
web_1            |       File "/opt/warehouse/lib/python3.6/site-packages/twisted/python/context.py", line 87, in callWithContext
web_1            |         self.contexts.pop()
web_1            |       File "/opt/warehouse/lib/python3.6/site-packages/twisted/web/wsgi.py", line 522, in run
web_1            |         self.started = True
web_1            |     --- <exception caught here> ---
web_1            |       File "/opt/warehouse/lib/python3.6/site-packages/twisted/web/wsgi.py", line 500, in run
web_1            |         self.write(elem)
web_1            |       File "/opt/warehouse/lib/python3.6/site-packages/twisted/web/wsgi.py", line 455, in write
web_1            |         self.reactor, wsgiWrite, self.started)
web_1            |       File "/opt/warehouse/lib/python3.6/site-packages/twisted/internet/threads.py", line 122, in blockingCallFromThread
web_1            |         result.raiseException()
web_1            |       File "/opt/warehouse/lib/python3.6/site-packages/twisted/python/failure.py", line 385, in raiseException
web_1            |         raise self.value.with_traceback(self.tb)
web_1            |     builtins.UnicodeEncodeError: 'latin-1' codec can't encode character '\u2603' in position 25: ordinal not in range(256)
@mmerickel
Copy link

related Pylons/webob#115

ewdurbin added a commit that referenced this issue Apr 16, 2018
ewdurbin added a commit that referenced this issue Apr 16, 2018
* workaround for #3712

* appease the linter

* remove hasattr call, all responses have a location, it may just be None
janiceshiu pushed a commit to janiceshiu/warehouse that referenced this issue Apr 18, 2018
* workaround for pypi#3712

* appease the linter

* remove hasattr call, all responses have a location, it may just be None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants