eBook download fails with python error

Bug #1869266 reported by Bubba Smiff
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

When trying to download an ebook from within Calibre, I receive the following:

calibre, version 4.12.0
ERROR: Unhandled exception: <b>AttributeError</b>:'str' object has no attribute 'decode'

calibre 4.12 embedded-python: False is64bit: True
Linux-5.5.10-200.fc31.x86_64-x86_64-with-fedora-31-Thirty_One Linux ('64bit', 'ELF')
('Linux', '5.5.10-200.fc31.x86_64', '#1 SMP Wed Mar 18 14:21:38 UTC 2020')
Python 3.7.6
Linux: ('Fedora', '31', 'Thirty One')
Interface language: None
Traceback (most recent call last):
  File "/usr/lib64/calibre/calibre/gui2/store/search/search.py", line 390, in result_item_activated
    self.download_book(result)
  File "/usr/lib64/calibre/calibre/gui2/store/search/search.py", line 401, in download_book
    self.gui.download_ebook(result.downloads[ext], filename=fname, create_browser=result.create_browser)
  File "/usr/lib64/calibre/calibre/gui2/ebook_download.py", line 147, in download_ebook
    start_ebook_download(Dispatcher(self.downloaded_ebook), self.job_manager, self, cookie_file, url, filename, save_loc, add_to_lib, tags, create_browser)
  File "/usr/lib64/calibre/calibre/gui2/ebook_download.py", line 131, in start_ebook_download
    description = _('Downloading %s') % filename.decode('utf-8', 'ignore') if filename else url.decode('utf-8', 'ignore')
AttributeError: 'str' object has no attribute 'decode'

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

 status fixreleased

Changed in calibre:
status: New → Fix Released
Paul White (paulw2u)
Changed in ubuntu:
status: New → Invalid
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.