Cannot start calibre

Bug #1884525 reported by Sunyata
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
calibre (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

OS: Lubuntu 20.04

When trying to start calibre i get the following output:

sunyata@bollingen:~$ calibre
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 529, in main
    app, opts, args = init_qt(args)
  File "/usr/lib/calibre/calibre/gui2/main.py", line 114, in init_qt
    app = Application(args, override_program_name=override, windows_app_uid=MAIN_APP_UID)
  File "/usr/lib/calibre/calibre/gui2/__init__.py", line 875, in __init__
    raise RuntimeError('Failed to load the progress_indicator C extension, with error: {}'.format(pi_err))
RuntimeError: Failed to load the progress_indicator C extension, with error: PyCapsule_GetPointer called with incorrect name
sunyata@bollingen:~$

What i've tried:
* Restarting the computer

Frequency of error: 5/5 (on the computer where the error was found)

Please note: I have the same OS (Lubuntu 20.04) on another computer and there Calibre starts without problems

***

# Additional information

sunyata@bollingen:~$ calibre --version
calibre (calibre 4.99.4)
sunyata@bollingen:~$

Installed using "sudo apt-get install calibre"

Tags: lubuntu
Sunyata (tord-dellsen)
summary: - Cannot start calibre (using Lubuntu 20.04)
+ Cannot start calibre
Revision history for this message
Eli Schwartz (eschwartz) wrote : Re: [Bug 1884525] [NEW] Cannot start calibre

> RuntimeError: Failed to load the progress_indicator C extension, with error: PyCapsule_GetPointer called with incorrect name

Your error indicates that the program has been built or installed
incorrectly.

> Installed using "sudo apt-get install calibre"

This means that the problem comes from the apt-get distributors (that is
to say, the Lubuntu packaging team, which apt-get downloads from).

If you instead download the standalone binary builds of calibre from
https://calibre-ebook.com/download_linux I suspect you will find that
they work fine.

Please report this bug to the Lubuntu developers. As a member of the
Debian/Ubuntu family of Linux distributions, they usually prefer bugs to
be reported directly to them -- then they will evaluate the bug, try to
figure out if it is a Ubuntu bug or a bug in calibre itself, and either
fix the bug within Ubuntu or forward it to the calibre developer.

(If, however, you have a problem with the standalone binary builds I
mentioned, then please report those here. Those do receive official
support directly from the calibre developer, and additionally can be
used as a test to reproduce bugs and determine if they are calibre bugs
rather than Ubuntu bugs.)

 status invalid

Changed in calibre:
status: New → Invalid
Revision history for this message
Sunyata (tord-dellsen) wrote :

The binary build that you gave worked for me, thank you!

I don't have experience with reporting bugs to Lubuntu/Ubuntu, where would i do that?

Thank you for your work with this application (i love it!)

Kind Regards,
Tord

Revision history for this message
Sunyata (tord-dellsen) wrote :

PS: It's strange though because the version of apt-get is the same on my desktop and laptop computers: apt 2.0.2ubuntu0.1

Revision history for this message
Eli Schwartz (eschwartz) wrote :

Actually according to https://phab.lubuntu.me/w/bugs/ it looks like
Lubuntu just tracks bugs via Ubuntu itself.

 affects ubuntu/calibre
 status new
 tag lubuntu

Eli Schwartz (eschwartz)
no longer affects: calibre
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in calibre (Ubuntu):
status: New → Confirmed
Revision history for this message
Treno70 (atgm) wrote :

i'm on regular ubuntu 20.04 and I have the same problem

Revision history for this message
carsten (carsten2) wrote :

OS xubuntu 20.04 LTS

when I try to start calibre I get the following output

~$ calibre
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'

Revision history for this message
G.M. (sexxxenator) wrote :

Hi there,

I don't think this bug is a duplicate of bug #1898904. Here the error is NOT "AttributeError: 'NoneType' object has no attribute 'cancel'" BUT "PyCapsule_GetPointer called with incorrect name".

I upgraded my Linux Mint 20 this morning & got the error in this bug not the other one.

The bug is there since 06/2020 & we are 12/2020. Does this means that Calibre is not usable for all Ubuntu (&derivates) uses for ~6 months?!? I find it strange... If it would be the case, this bug would have received a LOT more votes/attention, no?

Whatever, this bug is very blocking for me as I use Calibre a lot to read/convert books and comics. I've installed the latest standalone binary build of calibre as recommended by @eschwartz and it works seamlessly (I used `wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin install_dir=~/calibre-bin isolated=y` to install it as user for testing purposes).

Can someone tell me (or point me to documentations that explain) how I could create a wrapper package that executes this script and how I can ask Ubuntu's maintainers to replace the current faulty package from the repos by such a wrapper package?

Thanks

Revision history for this message
Eli Schwartz (eschwartz) wrote :

I agree it's not a duplicate, and I don't know why ~juanjo-benages marked it as such.

The PyCapsule error indicates a faulty build (possibly needs to be rebuilt for pyqt).

The AttributeError: 'NoneType' object has no attribute 'cancel' error is due to changes in python 3.8 between 3.8.2 and 3.8.3.

Both are bugs, both prevent running calibre, but they're not the SAME bug and they don't apply to the same builds. Apparently, some people merely saw "cannot start calibre" and lumped them all together.

Revision history for this message
Kacper Wysocki (kacperw) wrote :

dpkg -l | grep calibre
ii calibre 4.99.4+dfsg+really4.12.0-1ubuntu1 all powerful and easy to use e-book manager
ii calibre-bin 4.99.4+dfsg+really4.12.0-1ubuntu1 amd64 powerful and easy to use e-book manager

calibre
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 529, in main
    app, opts, args = init_qt(args)
  File "/usr/lib/calibre/calibre/gui2/main.py", line 114, in init_qt
    app = Application(args, override_program_name=override, windows_app_uid=MAIN_APP_UID)
  File "/usr/lib/calibre/calibre/gui2/__init__.py", line 875, in __init__
    raise RuntimeError('Failed to load the progress_indicator C extension, with error: {}'.format(pi_err))
RuntimeError: Failed to load the progress_indicator C extension, with error: PyCapsule_GetPointer called with incorrect name
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_calibre.1000.crash'

Original exception was:
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 529, in main
    app, opts, args = init_qt(args)
  File "/usr/lib/calibre/calibre/gui2/main.py", line 114, in init_qt
    app = Application(args, override_program_name=override, windows_app_uid=MAIN_APP_UID)
  File "/usr/lib/calibre/calibre/gui2/__init__.py", line 875, in __init__
    raise RuntimeError('Failed to load the progress_indicator C extension, with error: {}'.format(pi_err))
RuntimeError: Failed to load the progress_indicator C extension, with error: PyCapsule_GetPointer called with incorrect name

Can confirm the problem here.

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.