Opened 10 years ago
Last modified 10 years ago
#22996 closed Bug
UnicodeDecodeError on accessing `request.GET` — at Version 1
Reported by: | jorgecarleitao | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | jorgecarleitao | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
I'm getting a non-deterministic error while running Django 1.6.5 in production, when I try to access request.GET
:
Traceback (most recent call last): File "/home/jorgecarleitao/webapps/publics/lib/python3.3/django/core/handlers/base.py", line 114, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/jorgecarleitao/webapps/publics/public-contracts/contracts/category_views.py", line 79, in contracted context = build_costumer_list_context(context, request.GET) File "/home/jorgecarleitao/webapps/publics/lib/python3.3/django/core/handlers/wsgi.py", line 137, in _get_get raw_query_string = raw_query_string.encode('iso-8859-1').decode('utf-8')
from a request of the form:
'HTTP_FORWARDED_REQUEST_URI': '/categoria/8696/contratados?página=3'
I'm using one middleware, 'django.middleware.locale.LocaleMiddleware'
and página
is a translation.
This error occurs ~1 every 200 pageviews (estimated), and it seems to occur only on requests with gets of the form ?página=...
.
I will gladly help on this, although I'm not familiar with HTTP handling, thus I would need some guidance on what could be and where I should start looking.
Could you provide the full stack trace please?