[traceback] UnicodeDecodeError from Arecibo middleware

VERIFIED FIXED in 2011-12-27


8 years ago
7 years ago


(Reporter: jsocol, Assigned: erik)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: [qa-])



8 years ago
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)

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',
 '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_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: Gecko/20071004 Iceweasel/ (Debian-',
 '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_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_URL': '/en-US/questions/new',
 'REMOTE_PORT': '26556',
 '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_ADMIN': 'root@localhost',
 'SERVER_NAME': 'support.allizom.org',
 'SERVER_PORT': '443',
 '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)}>


8 years ago
Assignee: nobody → erik


7 years ago
Target Milestone: 2011-08-16 → 2011-08-23

Comment 1

7 years ago
Fixed in my fork of django-arecibo. Just waiting for Andy to merge it in (and grant me contrib access).


7 years ago
Target Milestone: 2011-08-23 → 2011-09-06

Comment 2

7 years ago
Pinged andy to get him to merge my thing.

Comment 3

7 years ago
Hasn't been r?d yet, so pushing to next week.
Target Milestone: 2011-09-06 → 2011-09-13

Comment 4

7 years ago
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


7 years ago
Target Milestone: 2011Q3 → 2011-10-11


7 years ago
Target Milestone: 2011-10-11 → 2011Q4

Comment 5

7 years ago
Think about using funfactory's handler instead: http://playdoh.readthedocs.org/en/latest/userguide/errors.html

Comment 6

7 years ago
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?

Comment 7

7 years ago
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.

Comment 8

7 years ago
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.

Comment 9

7 years ago
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: 2011Q4 → 2011-12-27
Please add verification steps, thanks
Whiteboard: [qa-]
Closed as [qa-]
You need to log in before you can comment on or make changes to this bug.