Bug 692525 - urllib.py - ValueError: invalid literal for int() with base 10: '7332, 7332'
Summary: urllib.py - ValueError: invalid literal for int() with base 10: '7332, 7332'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 14
Hardware: noarch
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 692267
TreeView+ depends on / blocked
 
Reported: 2011-03-31 13:44 UTC by Sandro Bonazzola
Modified: 2011-05-30 22:31 UTC (History)
5 users (show)

Fixed In Version: hplip-3.11.5-1.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-05 21:44:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Sandro Bonazzola 2011-03-31 13:44:04 UTC
Description of problem:
urllib fails decoding Content-Length header (seen running hp-plugin)

Version-Release number of selected component (if applicable):
python-2.7-8.fc14.1.i686
hplip-3.11.1-3.fc14.i686

How reproducible:
Always

Steps to Reproduce:
1. hp-plugin
2. press Next
3.
  
Actual results:
hp-plugin 

HP Linux Imaging and Printing System (ver. 3.11.1)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

/Checking for network connection...
Downloading configuration file from: http://hplip.sf.net/plugin.conf
Traceback (most recent call last):
  File "/usr/share/hplip/ui4/plugindialog.py", line 249, in NextButton_clicked
    self.plugin_download_callback)
  File "/usr/share/hplip/installer/core_install.py", line 1851, in get_plugin_info
    filename, headers = urllib.urlretrieve(plugin_conf_url, local_conf, callback)
  File "/usr/lib/python2.7/urllib.py", line 91, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.7/urllib.py", line 262, in retrieve
    size = int(headers["Content-Length"])
ValueError: invalid literal for int() with base 10: '7332, 7332'


Expected results:
No error

Additional info:

Comment 1 Sandro Bonazzola 2011-03-31 17:26:23 UTC
Present in Fedora 15 also:
hp-plugin 

HP Linux Imaging and Printing System (ver. 3.11.3)
Plugin Download and Install Utility ver. 2.1

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

/Checking for network connection...
Downloading configuration file from: http://hplip.sf.net/plugin.conf
Traceback (most recent call last):
  File "/usr/share/hplip/ui4/plugindialog.py", line 249, in NextButton_clicked
    self.plugin_download_callback)
  File "/usr/share/hplip/installer/core_install.py", line 1851, in get_plugin_info
    filename, headers = urllib.urlretrieve(plugin_conf_url, local_conf, callback)
  File "/usr/lib/python2.7/urllib.py", line 91, in urlretrieve
    return _urlopener.retrieve(url, filename, reporthook, data)
  File "/usr/lib/python2.7/urllib.py", line 262, in retrieve
    size = int(headers["Content-Length"])
ValueError: invalid literal for int() with base 10: '7332, 7332'

python-2.7.1-6.fc15.i686
hplip-3.11.3-1.fc15.i686

Comment 2 Ignacio Vazquez-Abrams 2011-03-31 19:41:47 UTC
There really isn't anything we can do if Sourceforge's web server refuses to speak HTTP properly (RFC 2616, ยง14.31, "Content-Length")...

Comment 3 Tim Waugh 2011-04-01 09:30:20 UTC
The issue is that there are actually two Content-Length header lines being received:

HTTP/1.1 200 OK
Server: Apache/2.2.3 (CentOS)
Last-Modified: Fri, 25 Mar 2011 08:04:35 GMT
ETag: "1ca4-49f4a0b6e0bd8"
Content-Length: 7332
Expires: Sun, 03 Apr 2011 09:26:20 GMT
Content-Type: text/plain
Content-Length: 7332
Date: Fri, 01 Apr 2011 09:26:20 GMT
X-Varnish: 41052789
Age: 0
Via: 1.1 varnish
Connection: close

Re-opening as there is a work-around in hplip-3.11.3a for this.

Comment 4 Fedora Update System 2011-04-01 09:41:47 UTC
hplip-3.11.3a-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/hplip-3.11.3a-1.fc15

Comment 5 Fedora Update System 2011-04-01 09:43:23 UTC
hplip-3.11.3a-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/hplip-3.11.3a-1.fc14

Comment 6 Fedora Update System 2011-04-01 09:44:42 UTC
hplip-3.11.3a-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/hplip-3.11.3a-1.fc13

Comment 7 Fedora Update System 2011-04-01 18:20:36 UTC
Package hplip-3.11.3a-1.fc13:
* should fix your issue,
* was pushed to the Fedora 13 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hplip-3.11.3a-1.fc13'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/hplip-3.11.3a-1.fc13
then log in and leave karma (feedback).

Comment 8 Sandro Bonazzola 2011-04-02 08:33:40 UTC
Verifyed on Fedora 15, hp-plugin now works fine for me.

Comment 9 Fedora Update System 2011-04-05 21:44:03 UTC
hplip-3.11.3a-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2011-05-30 22:29:25 UTC
hplip-3.11.5-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2011-05-30 22:30:53 UTC
hplip-3.11.5-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.