Bug 1840290 - Calibre fails to start - AttributeError: 'NoneType' object has no attribute 'cancel'
Summary: Calibre fails to start - AttributeError: 'NoneType' object has no attribute '...
Keywords:
Status: CLOSED DUPLICATE of bug 1840780
Alias: None
Product: Fedora
Classification: Fedora
Component: calibre
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-26 17:04 UTC by Thomas Lake
Modified: 2020-10-18 00:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-29 22:45:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kovidgoyal/calibre/commit/7b6416ac6522fc40f24f6baf3ca552b17a8b91d6 0 None None None 2020-08-11 14:17:18 UTC

Description Thomas Lake 2020-05-26 17:04:30 UTC
Description of problem: Calibre fails to launch

Version-Release number of selected component (if applicable):
calibre-4.13.0-1.fc32.x86_64

Steps to Reproduce:
1. Launch Calibre from application list or by running 'calibre' from a shell

Actual results:

QSocketNotifier: Can only be used with threads started with QThread
Traceback (most recent call last):
  File "/usr/bin/calibre", line 20, in <module>
    sys.exit(calibre())
  File "/usr/lib64/calibre/calibre/gui_launch.py", line 72, in calibre
    main(args)
  File "/usr/lib64/calibre/calibre/gui2/main.py", line 542, in main
    listener = create_listener()
  File "/usr/lib64/calibre/calibre/gui2/main.py", line 513, in create_listener
    return Listener(address=gui_socket_address())
  File "/usr/lib64/calibre/calibre/utils/ipc/server.py", line 109, in __init__
    self._listener._unlink.cancel()
AttributeError: 'NoneType' object has no attribute 'cancel'


Expected results:

GUI starts

Additional info:
"QSocketNotifier" line appears to be unrelated

Bug appears to be fixed upstream in v4.15.0 (commmit 7b6416ac6522fc40f24f6baf3ca552b17a8b91d6)

Comment 1 Kevin Fenzi 2020-05-29 22:45:59 UTC

*** This bug has been marked as a duplicate of bug 1840780 ***

Comment 2 Kyle 2020-10-15 00:32:23 UTC
I am encountering this exact same bug, I have the latest update of calibre... can someone please explain further how to fix this bug?

Comment 3 Brent 2020-10-18 00:57:17 UTC
The answer is buried in the thread on the duplicate bug (# 1840780), but to save you time, the patch is at https://github.com/kovidgoyal/calibre/commit/7b6416ac6522fc40f24f6baf3ca552b17a8b91d6.  Edit your /usr/lib/calibre/calibre/utils/ipc/server.py (or wherever you have it installed, try "locate ipc/server.py" to find the path) to check the time of self._listener._unlink before calling its cancel() method, as shown in the GitHub patch.

Alternatively, it sounds like downgrading Python to an older version or upgrading Calibre to a newer one may take care of the issue, but this is a quick and easy fix with negligible risk of upsetting anything else, if you're not prepared to abandon your distro's default Python/Calibre packages.


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