#22996: UnicodeDecodeError on accessing `request.GET` --------------------------------+-------------------------------------- Reporter: jorgecarleitao | Owner: nobody Type: Bug | Status: new Component: HTTP handling | Version: 1.6 Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------+--------------------------------------
Comment (by jorgecarleitao): Thanks for formatting it Aymeric. This is all I have in the email I receive with the traceback (removed 2 informations that could help to identify the user): {{{ 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') UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe1 in position 1: invalid continuation byte <WSGIRequest path:/categoria/8696/contratados, GET:<could not parse>, POST:<QueryDict: {}>, COOKIES:{'_ga': 'GA1.2.235397185.1404980740'}, META:{'DOCUMENT_ROOT': '/usr/local/apache2/htdocs', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x -ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'pt', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'close', 'HTTP_COOKIE': '_ga=GA1.2.235397185.1404980740', 'HTTP_FORWARDED_REQUEST_URI': '/categoria/8696/contratados?página=3', 'HTTP_HOST': 'publicos.pt', 'HTTP_HTTPS': 'off', 'HTTP_HTTP_X_FORWARDED_PROTO': 'http', 'HTTP_USER_AGENT': ------------------------ 'HTTP_VIA': '1.1 cmaGD.cma.local (squid/3.3.8)', 'HTTP_X_FORWARDED_FOR': --------------------- 'HTTP_X_FORWARDED_HOST': 'publicos.pt', 'HTTP_X_FORWARDED_PROTO': 'http', 'HTTP_X_FORWARDED_SERVER': 'publicos.pt', 'HTTP_X_FORWARDED_SSL': 'off', 'PATH_INFO': '/categoria/8696/contratados', 'PATH_TRANSLATED': '/home/jorgecarleitao/webapps/publics/public- contracts/main/apache/wsgi.py/categoria/8696/contratados', 'QUERY_STRING': 'página=3', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '33908', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/categoria/8696/contratados?página=3', 'SCRIPT_FILENAME': '/home/jorgecarleitao/webapps/publics/public- contracts/main/apache/wsgi.py', 'SCRIPT_NAME': '', 'SERVER_ADDR': '127.0.0.1', 'SERVER_ADMIN': '[no address given]', 'SERVER_NAME': 'publicos.pt', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SIGNATURE': '', 'SERVER_SOFTWARE': 'Apache/2.2.25 (Unix) mod_wsgi/3.4 Python/3.3.2', 'mod_wsgi.application_group': 'web306.webfaction.com|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.enable_sendfile': '0', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '10392', 'mod_wsgi.process_group': 'publics', 'mod_wsgi.queue_start': '1405000563669244', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 4), 'wsgi.errors': <_io.TextIOWrapper encoding='utf-8'>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7fc0566d5828>, 'wsgi.input': <mod_wsgi.Input object at 0x7fc05c0586b0>, 'wsgi.multiprocess': True, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}> }}} -- Ticket URL: <https://code.djangoproject.com/ticket/22996#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/072.dcc1b74cacd3dc1d697012f0abb729da%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.