Comment #2 on issue 3427 by ra...@mt.com.tw: "ValueError: too many values to unpack" when upload a pdf file
http://code.google.com/p/reviewboard/issues/detail?id=3427

How I reproduce:
================

1. Create a review that has no Repository (file attachments only)
2. upload the PDF I attached in previous comment

Error will occur when I hit upload button.

However, it only happens when I use Firefox(even with safe-mode) on my pc, Chrome/Chromium works fine. I cannot reproduce on my coworkers' computers, which are Lubuntu/Win Vista.

I also upload a file attachments screenshot, files that contains malformed MIME type are the one that cause error, but all files are the same file.

Entire traceback:
=================

[Mon Jun 23 05:48:08 2014] [error] ERROR:django.request:Internal Server Error: /api/review-requests/1498/file-attachments/
[Mon Jun 23 05:48:08 2014] [error] Traceback (most recent call last):
[Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/core/handlers/base.py", line 188, in get_response [Mon Jun 23 05:48:08 2014] [error] response = middleware_method(request, response) [Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/middleware/http.py", line 14, in process_response [Mon Jun 23 05:48:08 2014] [error] response['Content-Length'] = str(len(response.content)) [Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/Djblets-0.7.10-py2.7.egg/djblets/webapi/core.py", line 281, in _get_content [Mon Jun 23 05:48:08 2014] [error] content = adapter.encode(self.api_data, request=self.request) [Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/Djblets-0.7.10-py2.7.egg/djblets/webapi/core.py", line 88, in encode [Mon Jun 23 05:48:08 2014] [error] return super(JSONEncoderAdapter, self).encode(o) [Mon Jun 23 05:48:08 2014] [error] File "/usr/lib64/python2.7/site-packages/simplejson/encoder.py", line 226, in encode [Mon Jun 23 05:48:08 2014] [error] chunks = self.iterencode(o, _one_shot=True) [Mon Jun 23 05:48:08 2014] [error] File "/usr/lib64/python2.7/site-packages/simplejson/encoder.py", line 296, in iterencode
[Mon Jun 23 05:48:08 2014] [error]     return _iterencode(o, 0)
[Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/Djblets-0.7.10-py2.7.egg/djblets/webapi/core.py", line 96, in default [Mon Jun 23 05:48:08 2014] [error] result = self.encoder.encode(o, *self.encode_args, **self.encode_kwargs) [Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/Djblets-0.7.10-py2.7.egg/djblets/webapi/core.py", line 261, in encode [Mon Jun 23 05:48:08 2014] [error] result = encoder.encode(*args, **kwargs) [Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/Djblets-0.7.10-py2.7.egg/djblets/webapi/encoders.py", line 48, in encode [Mon Jun 23 05:48:08 2014] [error] return resource.serialize_object(o, *args, **kwargs) [Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/Djblets-0.7.10-py2.7.egg/djblets/webapi/resources.py", line 918, in serialize_object
[Mon Jun 23 05:48:08 2014] [error]     value = getattr(obj, field)
[Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/ReviewBoard-1.7.5-py2.7.egg/reviewboard/attachments/models.py", line 57, in icon_url [Mon Jun 23 05:48:08 2014] [error] return self.mimetype_handler.get_icon_url() [Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/ReviewBoard-1.7.5-py2.7.egg/reviewboard/attachments/models.py", line 26, in mimetype_handler
[Mon Jun 23 05:48:08 2014] [error]     return MimetypeHandler.for_type(self)
[Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/ReviewBoard-1.7.5-py2.7.egg/reviewboard/attachments/mimetypes.py", line 139, in for_type [Mon Jun 23 05:48:08 2014] [error] mimetype = mimeparse.parse_mime_type(attachment.mimetype) [Mon Jun 23 05:48:08 2014] [error] File "/usr/lib/python2.7/site-packages/mimeparse-0.1.3-py2.7.egg/mimeparse.py", line 38, in parse_mime_type [Mon Jun 23 05:48:08 2014] [error] (type, subtype) = full_type.split("/")
[Mon Jun 23 05:48:08 2014] [error] ValueError: too many values to unpack




Attachments:
        Selection_001.png  64.8 KB

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.

Reply via email to