Calibre stopped working recently. Tried uninstalling and reinstalling.
When I open a terminal and call $calibre
I get the following error message:
Traceback (most recent call last):
File "/usr/bin/calibre", line 20, in <module>
sys.exit(calibre())
File "/usr/lib/calibre/calibre/gui_launch.py", line 73, in calibre
main(args)
File "/usr/lib/calibre/calibre/gui2/main.py", line 543, in main
listener = create_listener()
File "/usr/lib/calibre/calibre/gui2/main.py", line 514, in create_listener
return Listener(address=gui_socket_address())
File "/usr/lib/calibre/calibre/utils/ipc/server.py", line 110, in __init__
self._listener._unlink.cancel()
AttributeError: 'NoneType' object has no attribute 'cancel'
Do I need to install some dependency that the sudo apt install didn't get? I tried installing via command line and the software installer/updater GUI.
I'm on version Ubuntu 20.04.1 LTS. I made sure that my software in general is up to date also.
Unfortunately, at this moment the version of Calibre that is in the 20.04 repos is version 4.99 which does not work with Python 3. To make 4.99 work you would have to patch a file yourself as shown in the bug https://bugs.launchpad.net/ubuntu/+source/calibre/+bug/1898904 or you could download it from a different repository. Either way, Canonical has not patched 4.99 to work with 20.04 yet in the official repositories.
Also, quoted from Calibre themselves:
You can download it from https://calibre-ebook.com/download_linux
You can also run the command from that site to install it (which is actually easier to install with):
I have added the above command to a script called
install_calibre
so that I can run it anytime to update my Calibre to the newest version.Hope this helps!
To fix this, it is not necessary to abandon Calibre 4.99. The cause of the crash is documented in bug #1898904, which can be fixed with a one-line patch. To manually apply the patch:
sudo gedit /usr/lib/calibre/calibre/utils/ipc/server.py
This change will be overwritten when Calibre is updated, but of course it won't matter because this bug has been fixed in the next version of Calibre.
Sorry for interupting, This may not be an ideal go around, but maybe a temporary solution. I also face the same problem, in my Ubuntu 20.04, and I decided to install the flathub version instead and its being running fine up till now.
https://flathub.org/apps/details/com.calibre_ebook.calibre
Calibre is working properly again.
Calibre has been updated in Ubuntu 20.04 and later. The latest version of Calibre from the Ubuntu 20.04 default repositories is working properly again.
https://download.calibre-ebook.com/4.html
Go to this site and download previous version. extract the file run the Calibre file (which as no extension) just double click.
Check on the launchpad the corrected packages. They are made from the patch metioned above. First install the bin package and then the alldeb. In that way no need to add ppa, flatpack or manually install sh scripts.