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 05-26-2023, 04:32 AM   #1
otakutyrant
Member
otakutyrant began at the beginning.
 
Posts: 13
Karma: 10
Join Date: May 2023
Device: Kindle
Unhappy No module named 'calibre_plugins'

I have almost completed my plugin. But when I click the icon in the menu bar, it complains:

```
Traceback (most recent call last):
File "/usr/bin/calibre-parallel", line 21, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/calibre/calibre/utils/ipc/worker.py", line 205, in main
name, args, kwargs, desc = eintr_retry_call(conn.recv)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/calibre/calibre/utils/ipc/__init__.py", line 24, in eintr_retry_call
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/connection.py", line 250, in recv
return _ForkingPickler.loads(buf.getbuffer())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'calibre_plugins'
```

Could you help me please? Here is the source code: https://github.com/otakutyrant/new_words
otakutyrant is offline   Reply With Quote
Old 05-26-2023, 11:16 AM   #2
otakutyrant
Member
otakutyrant began at the beginning.
 
Posts: 13
Karma: 10
Join Date: May 2023
Device: Kindle
I have removed the job manager so that my plugin can work. Now the old code with the broken job manger is in https://github.com/otakutyrant/new_w...ee/job_manager
otakutyrant is offline   Reply With Quote
Old 05-26-2023, 11:20 AM   #3
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,867
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Dont serialize objects from your plugin. Use basic python types only. That means when calling functions in a job, those functions should take only basic types as parameters.
kovidgoyal is offline   Reply With Quote
Old 05-26-2023, 11:23 AM   #4
otakutyrant
Member
otakutyrant began at the beginning.
 
Posts: 13
Karma: 10
Join Date: May 2023
Device: Kindle
Quote:
Originally Posted by kovidgoyal View Post
Dont serialize objects from your plugin. Use basic python types only. That means when calling functions in a job, those functions should take only basic types as parameters.
Thank you! I'll try to fix that.
otakutyrant is offline   Reply With Quote
Old 06-13-2023, 05:09 AM   #5
otakutyrant
Member
otakutyrant began at the beginning.
 
Posts: 13
Karma: 10
Join Date: May 2023
Device: Kindle
I tried the pickle library and found out it can pickle namedtuple objects. However I have to convert the namedtuple objects to tuple objects in my plugin to make them work with the job manager. It is a mystery to me why Calibre cannot serialize them and throw `ModuleNotFoundError`.
otakutyrant is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No module named PyQt5.Qt silentfuzzle Development 2 08-19-2014 12:31 PM
No module named icu favour Development 2 04-08-2014 11:37 PM
ImportError: No module named djvu canadianjameson Conversion 12 04-01-2012 11:23 PM
ImportError: No module named profiles ould Calibre 11 02-28-2009 07:25 PM
ImportError: No module named pkg_resources erik80 Calibre 3 08-02-2008 09:33 AM


All times are GMT -4. The time now is 10:01 PM.


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