Closed Bug 676265 Opened 14 years ago Closed 13 years ago

[traceback] UnicodeDecodeError from Arecibo middleware

Categories

(support.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
2011-12-27

People

(Reporter: jsocol, Assigned: erik)

Details

(Whiteboard: [qa-])

This is coming back from the middleware, _before_ the task gets queued/runs. I suspect it's from the "\n" not being u'\n', but the data list being unicode. ----- Traceback (most recent call last): File "/data/www/support.allizom.org/kitsune/vendor/src/django/django/core/handlers/base.py", line 117, in get_response response = middleware_method(request, e) File "/data/www/support.allizom.org/kitsune/vendor/src/django-arecibo/django_arecibo/middleware.py", line 21, in process_exception return arecibo_post(delayed_post, request, exception) File "/data/www/support.allizom.org/kitsune/vendor/src/django-arecibo/django_arecibo/middleware.py", line 9, in arecibo_post method(request, 404) File "/data/www/support.allizom.org/kitsune/vendor/src/django-arecibo/django_arecibo/tasks.py", line 9, in post obj = DjangoPost(request, status, **kw) File "/data/www/support.allizom.org/kitsune/vendor/src/django-arecibo/django_arecibo/wrapper.py", line 71, in __init__ "request": "\n".join(data).encode("utf-8"), UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 22: ordinal not in range(128) <WSGIRequest GET:<QueryDict: {u'product': [u'\xbcwhscheck\xbe']}>, POST:<QueryDict: {}>, COOKIES:{'anoncsrf': 'ed6849cab30a5c52fc03081e8d9f2148', 'sumo_session': '1'}, META:{'DOCUMENT_ROOT': '/data/www/support.allizom.org/kitsune/webroot', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CONNECTION': 'Keep-Alive, TE', 'HTTP_HOST': 'support.allizom.org', 'HTTP_KEEP_ALIVE': '300', 'HTTP_REFERER': 'https://support.allizom.org/en-US/questions/new', 'HTTP_SSLCLIENTCERTSTATUS': 'NoClientCert', 'HTTP_SSLCLIENTCIPHER': 'SSL_RSA_WITH_RC4_128_SHA, version=SSLv3, bits=128', 'HTTP_SSLSESSIONID': '80D60EEE7C91D772B50913C7E27F4990ECD5CF5FDD8F82B4D1A53299D7C695F8', 'HTTP_TE': 'deflate,gzip;q=0.3', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.8) Gecko/20071004 Iceweasel/2.0.0.8 (Debian-2.0.0.6+2.0.0.8-0etch1)', 'HTTP_X_CLUSTER_CLIENT_IP': '209.10.217.226', 'HTTP_X_FORWARDED_FOR': '209.10.217.226', 'PATH_INFO': u'/en-US/questions/new', 'PATH_TRANSLATED': 'redirect:/k/en-US/questions/new/questions/new', 'QUERY_STRING': 'product=\xc2\xbcwhscheck\xc2\xbe', 'REDIRECT_HTTPS': 'on', 'REDIRECT_QUERY_STRING': 'product=\xc2\xbcwhscheck\xc2\xbe', 'REDIRECT_SCRIPT_URI': 'https://support.allizom.org/en-US/questions/new', 'REDIRECT_SCRIPT_URL': '/en-US/questions/new', 'REDIRECT_STATUS': '200', 'REDIRECT_URL': '/en-US/questions/new', 'REMOTE_ADDR': '209.10.217.226', 'REMOTE_PORT': '26556', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/en-US/questions/new?product=\xc2\xbcwhscheck\xc2\xbe', 'SCRIPT_FILENAME': '/data/www/support.allizom.org/kitsune/wsgi/kitsune.wsgi', 'SCRIPT_NAME': u'', 'SCRIPT_URI': 'https://support.allizom.org/en-US/questions/new', 'SCRIPT_URL': '/en-US/questions/new', 'SERVER_ADDR': '10.2.74.53', 'SERVER_ADMIN': 'root@localhost', 'SERVER_NAME': 'support.allizom.org', 'SERVER_PORT': '443', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '<address>Apache/2.2.3 (Red Hat) Server at support.allizom.org Port 443</address>\n', 'SERVER_SOFTWARE': 'Apache/2.2.3 (Red Hat)', 'mod_wsgi.application_group': 'support.allizom.org|/k', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '81', 'mod_wsgi.process_group': 'kitsune-ssl', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 3), 'platform.name': 'dm-app-sumo01.mozilla.org', 'wsgi.errors': <mod_wsgi.Log object at 0x2aaab300eb30>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x2aaab2fdcaf8>, 'wsgi.input': <mod_wsgi.Input object at 0x2aaab300ef70>, 'wsgi.loaded': datetime.datetime(2011, 8, 3, 8, 1, 2, 794591), 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'https', 'wsgi.version': (1, 1)}>
Assignee: nobody → erik
Target Milestone: 2011-08-16 → 2011-08-23
Fixed in my fork of django-arecibo. Just waiting for Andy to merge it in (and grant me contrib access).
Target Milestone: 2011-08-23 → 2011-09-06
Pinged andy to get him to merge my thing.
Hasn't been r?d yet, so pushing to next week.
Target Milestone: 2011-09-06 → 2011-09-13
This missed 9-13, and 9-20 :(. If this bug is assigned to you please retarget and take care of it ASAP.
Target Milestone: 2011-09-13 → 2011Q3
Target Milestone: 2011Q3 → 2011-10-11
Target Milestone: 2011-10-11 → 2011Q4
Think about using funfactory's handler instead: http://playdoh.readthedocs.org/en/latest/userguide/errors.html
We should try to get Arecibo running by the end of the year. It's been around for a while and wouldn't a nice Christmas/Channukah/New Years gift be less error email?
Fixed the pull request and awaiting a fresh review. I don't see a reason not to turn on Arecibo in production, especially after this lands.
Incidentally, I got Jabba to relabel our servers in arecibo and add support-dev. Something's wrong with arecibo login, so I couldn't do it myself.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: 2011Q4 → 2011-12-27
Please add verification steps, thanks
Whiteboard: [qa-]
Closed as [qa-]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.