Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 10-28-2022, 07:49 AM   #1
Einridi
Junior Member
Einridi began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2022
Location: Somewhere in France
Device: none
'QThread: Destroyed while thread is still running'

Hi there,
I'm trying to convert a plugin written in python 2 (worked great) to python 3 so it works with the latest versions of calibre.

Ubuntu 22.04.1 updated
Calibre 6.7.1
Plugin 'Personnaliseur'
Python 3
Converting with py2to3
Fixing errors with PyCharm

However, when I try to launch calibre in Shell, nothing happens... except the following error message:
'QThread: Destroyed while thread is still running'
So I am unable to access calibre nor my library. I don't know how to open calibre to fix or remove this plugin.
I am self-taught and I admit that despite my extensive research on the web, I have not found a solution.

I think the easiest and provide you this plugin below. If someone could look at it... be indulgent, it's my first!

This is why I appeal to your wise advice.
Thank you in advance for your help.
Attached Files
File Type: zip personnaliseur.zip (89.8 KB, 98 views)
Einridi is offline   Reply With Quote
Old 10-28-2022, 09:57 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Run calibre as

calibre --ignore-plugins

then you can remove the plugin using Preferences->Plugins
kovidgoyal is offline   Reply With Quote
Old 10-28-2022, 01:19 PM   #3
Einridi
Junior Member
Einridi began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2022
Location: Somewhere in France
Device: none
Thank you very much Kovid!
I was finally able to restart caliber and remove the recalcitrant plugin.
I will continue to search. If anyone has any advice or suggestions, I'm all ears.
Einridi is offline   Reply With Quote
Old 10-28-2022, 01:48 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
@Einridi do you have access to Windows? If you do, you can install Calibre portable and use that to work on this plugin without causing any problem with your main Calibre install.
JSWolf is offline   Reply With Quote
Old 10-29-2022, 01:01 AM   #5
Einridi
Junior Member
Einridi began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2022
Location: Somewhere in France
Device: none
@JSWolf
No, I haven't used windows for a long time, but I take note of this tip.
Einridi is offline   Reply With Quote
Old 10-29-2022, 03:54 AM   #6
Leseratte_10
Groupie
Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.Leseratte_10 ought to be getting tired of karma fortunes by now.
 
Posts: 181
Karma: 2010542
Join Date: Sep 2021
Device: PB Era, PB InkPad 3 Pro
Quote:
Originally Posted by JSWolf View Post
@Einridi do you have access to Windows? If you do, you can install Calibre portable and use that to work on this plugin without causing any problem with your main Calibre install.
What does this have to do with Windows? You can do the same thing on Linux with the Linux version of Calibre.
Leseratte_10 is offline   Reply With Quote
Old 11-06-2022, 01:15 PM   #7
Einridi
Junior Member
Einridi began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2022
Location: Somewhere in France
Device: none
My plugin does not open

Hello,
Despite multiple attempts, I still can't get my plugin to work in calibre (despite it being installed there and present in preferences).
Indeed, after starting calibre, the 'PersonnaLiseur' icon does not appear in the menu bar, nor in the contextual menu (right click).
Here is the associated debug report:

Code:
ApplicationPaletteChange event ignored
Using calibre Qt style: True
Traceback (most recent call last):
  File "calibre/gui2/ui.py", line 137, in __init__
  File "calibre/gui2/ui.py", line 155, in init_iaction
  File "calibre/customize/__init__.py", line 624, in load_actual_plugin
  File "importlib/__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "calibre/customize/zipplugin.py", line 206, in exec_module
  File "calibre_plugins.personnaliseur.ui", line 14, in <module>
    from calibre_plugins.personnaliseur.dialogue import PL
  File "calibre/customize/zipplugin.py", line 206, in exec_module
  File "calibre_plugins.personnaliseur.dialogue", line 18, in <module>
    from calibre_plugins.personnaliseur.job import ProgressDialog
  File "calibre/customize/zipplugin.py", line 206, in exec_module
  File "calibre_plugins.personnaliseur.job", line 23, in <module>
    from calibre_plugins.ebooks.oeb.polish.container import get_container
ModuleNotFoundError: No module named 'calibre_plugins.ebooks'
calibre Journal de débogage
calibre 6.7.1  embedded-python: True
Linux-5.15.0-52-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.15.0-52-generic', '#58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022')
Python 3.10.1
Interface language: fr
Successfully initialized third party plugins: DeDRM (10, 0, 3) && PersonnaLiseur (1, 2, 4)
calibre 6.7.1  embedded-python: True
Linux-5.15.0-52-generic-x86_64-with-glibc2.35 Linux ('64bit', 'ELF')
('Linux', '5.15.0-52-generic', '#58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022')
Python 3.10.1
Interface language: fr
Successfully initialized third party plugins: DeDRM (10, 0, 3) && PersonnaLiseur (1, 2, 4)
QPA platform: wayland
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 119.92131147540982 x 117.5657142857143
[0.00] Starting up...
[0.00] Showing splash screen...
[0.06] splash screen shown
[0.06] Initializing db...
[1.56] db initialized
[1.56] Constructing main UI...
abc
abc123
Key '' for shortcut Book list header menu is already used by 'Gérer les catégories', ignoring
[3.99] main UI initialized...
[3.99] Hiding splash screen
Starting QuickView
[9.70] splash screen hidden
[9.70] Started up in 9.70 seconds with 1580 books
I add that I only modified the files in calibre_plugins.personnaliseur...
I guess you shouldn't touch the files from the calibre program itself ?

Does anyone have any suggestions to resolve this inconvenience ?
thank you in advance for your wise advice.
Einridi is offline   Reply With Quote
Old 11-06-2022, 08:53 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You have

from calibre_plugins.ebooks.oeb.polish.container import get_container

you want

from calibre.ebooks.oeb.polish.container import get_container
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura H2O Second H2O Destroyed :( Rand Brittain Kobo Reader 11 01-24-2016 08:49 AM
Advice needed for plugin running background thread Phssthpok Plugins 21 01-16-2016 10:31 AM
Almost destroyed my K1 carld Amazon Kindle 9 08-26-2010 10:52 AM
PRS-600 Help: it seems I just destroyed my reader hahahut Sony Reader 3 07-30-2010 09:24 AM
Destroyed reader trying to get a new one via warranty Roy White Sony Reader 3 06-07-2008 08:29 PM


All times are GMT -4. The time now is 12:05 PM.


MobileRead.com is a privately owned, operated and funded community.