Binary linux installer fails because of bug in proxy debugging output

Bug #1286274 reported by Adrianna Pińska
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

I run Calibre on Ubuntu, performing the manual binary upgrades as described on the Calibre homepage: http://calibre-ebook.com/download_linux

I am currently running 1.25, and when I tried to upgrade to 1.26.0 today I got this error:

XXXXXX@XXXXXX:~$ sudo -v && wget -nv -O- https://github.com/kovidgoyal/calibre/raw/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
[sudo] password for XXXXXX:
2014-02-28 19:52:53 URL:https://raw.github.com/kovidgoyal/calibre/master/setup/linux-installer.py [25006/25006] -> "-" [1]
Installing to /opt/calibre
Downloading tarball signature securely...
Using proxies: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 643, in main
  File "<string>", line 605, in download_and_extract
  File "<string>", line 597, in get_tarball_info
  File "<string>", line 546, in get_https_resource_securely
  File "<string>", line 352, in get_proxies
  File "<string>", line 207, in prints
TypeError: expected a character buffer object

In line 352, a dict is being sent to a printing function which expects strings. I'm attaching a suggested patch. Is there a reason why this debugging output is turned on by default?

Tags: installer
Revision history for this message
Adrianna Pińska (confluence) wrote :
Revision history for this message
Adrianna Pińska (confluence) wrote :

If anyone else experiences the same problem before the installer is fixed: you can work around it by downloading the installer file, applying the patch, and executing the local copy of the installer:

$ wget https://github.com/kovidgoyal/calibre/raw/master/setup/linux-installer.py
$ wget https://bugs.launchpad.net/calibre/+bug/1286274/+attachment/4001048/+files/proxy_debug.patch
$ patch < proxy_debug.patch
$ cat linux-installer.py | | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"

Revision history for this message
Adrianna Pińska (confluence) wrote :

Sorry, there's a typo in the last command of the workaround -- there should only be one pipe, not two:

cat linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"

Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.