Re: Issue 3427 in reviewboard: "ValueError: too many values to unpack" when upload a pdf file

2014-07-19 Thread reviewboard

Updates:
Status: Fixed

Comment #6 on issue 3427 by trowb...@gmail.com: "ValueError: too many  
values to unpack" when upload a pdf file

http://code.google.com/p/reviewboard/issues/detail?id=3427

Fixed in release-2.0.x (928eb49). Thanks!

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


Re: Issue 3427 in reviewboard: "ValueError: too many values to unpack" when upload a pdf file

2014-07-19 Thread reviewboard

Updates:
Status: PendingReview
Owner: trowb...@gmail.com
Labels: Component-Attachments

Comment #5 on issue 3427 by trowb...@gmail.com: "ValueError: too many  
values to unpack" when upload a pdf file

http://code.google.com/p/reviewboard/issues/detail?id=3427

I'm going to make a change to not trust the browser-provided mimetype if  
it's not valid.


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


Re: Issue 3427 in reviewboard: "ValueError: too many values to unpack" when upload a pdf file

2014-07-10 Thread reviewboard


Comment #4 on issue 3427 by trowb...@gmail.com: "ValueError: too many  
values to unpack" when upload a pdf file

http://code.google.com/p/reviewboard/issues/detail?id=3427

Something about those mimetypes is also very  
wrong. "text/text/application/pdf" is not a correctly-formatted mimetype.


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


Re: Issue 3427 in reviewboard: "ValueError: too many values to unpack" when upload a pdf file

2014-06-24 Thread reviewboard


Comment #3 on issue 3427 by chip...@gmail.com: "ValueError: too many values  
to unpack" when upload a pdf file

http://code.google.com/p/reviewboard/issues/detail?id=3427

I don't know off-hand, but the very first thing I'd want you to do before  
looking into it further is to upgrade to a modern version of Review Board.  
So much has changed since the early 1.7 releases.


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


Re: Issue 3427 in reviewboard: "ValueError: too many values to unpack" when upload a pdf file

2014-06-22 Thread reviewboard


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://gro

Re: Issue 3427 in reviewboard: "ValueError: too many values to unpack" when upload a pdf file

2014-06-22 Thread reviewboard

Updates:
Status: NeedInfo

Comment #1 on issue 3427 by chip...@gmail.com: "ValueError: too many values  
to unpack" when upload a pdf file

http://code.google.com/p/reviewboard/issues/detail?id=3427

I can't reproduce this on the demo server. I think what you saw there was  
an entirely separate issue. It's also a very strange one that I'm pretty  
sure nobody has reported to us before.


Can you provide the entire traceback?

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


Issue 3427 in reviewboard: "ValueError: too many values to unpack" when upload a pdf file

2014-06-19 Thread reviewboard

Status: New
Owner: 
Labels: Type-Defect Priority-Medium

New 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

*** READ THIS BEFORE POSTING!
***
*** You must complete this form in its entirety, or your bug report will be
*** rejected.
***
*** If you have a security issue to report, please send it confidentially
to
*** secur...@reviewboard.org. Posting security-related issues to this bug
*** tracker causes us to have to do an emergency release.
***
*** For customer support, please post to reviewbo...@googlegroups.com
***
*** If you have a patch, please submit it to
http://reviews.reviewboard.org/
***
*** This bug tracker is public. Please check that any logs or other
information
*** that you include has been stripped of confidential information.


What version are you running?

1.7.5, but also reproducible on demo site (2.0.3)

What's the URL of the page containing the problem?

When view a review request (my.reviewsboard/r//)

What steps will reproduce the problem?
1. Create a review request
2. Upload a PDF file


What is the expected output? What do you see instead?

File should be uploaded correctly, instead it return a 500 internal error

What operating system are you using? What browser?
Linux (Mint 16), Firefox 29.0

Please provide any additional information below.

I provide a pdf that cause the trouble.

I think the mimetype is wrong. If login admin to check file attachment, the  
mimetype is "text/text/application/pdf"



here is part of the log

[Thu Jun 19 10:21:06 2014] [error] value = self._resolve_lookup(context)
[Thu Jun 19 10:21:06 2014] [error]
File "/usr/lib/python2.7/site-packages/Django-1.4.5-py2.7.egg/django/template/base.py",  
line 754, in _resolve_lookup

[Thu Jun 19 10:21:06 2014] [error] current = getattr(current, bit)
[Thu Jun 19 10:21:06 2014] [error]
File "/usr/lib/python2.7/site-packages/ReviewBoard-1.7.5-py2.7.egg/reviewboard/attachments/models.py",  
line 32, in review_ui
[Thu Jun 19 10:21:06 2014] [error] self._review_ui =  
FileAttachmentReviewUI.for_type(self)
[Thu Jun 19 10:21:06 2014] [error]
File "/usr/lib/python2.7/site-packages/ReviewBoard-1.7.5-py2.7.egg/reviewboard/reviews/ui/base.py",  
line 168, in for_type
[Thu Jun 19 10:21:06 2014] [error] mimetype =  
mimeparse.parse_mime_type(attachment.mimetype)
[Thu Jun 19 10:21:06 2014] [error]
File "/usr/lib/python2.7/site-packages/mimeparse-0.1.3-py2.7.egg/mimeparse.py",  
line 38, in parse_mime_type
[Thu Jun 19 10:21:06 2014] [error] (type, subtype) =  
full_type.split("/")

[Thu Jun 19 10:21:06 2014] [error] ValueError: too many values to unpack

Attachments:
empty.pdf  8.1 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.