I'm having problems spinning up cherrypy inside the plugin. I was able to create a plugin using kovid's template (thanks kovid!). Since I'm running inside the plugin I think I can follow the same process used in
add.py.
Is it alright if I use the thread as a sort of dev blog?
So I'm stuck on two parts, I've never worked in cherrypy and only have theoretical knowledge of python.
1: When I try to use the cherrypy's
cherrypy.dispatch.MethodDispatcher to create the REST endpoints I get
Code:
Traceback (most recent call last):
File "site-packages/calibre/gui2/ui.py", line 226, in initialize
File "site-packages/calibre/gui2/actions/__init__.py", line 143, in do_genesis
File "calibre_plugins.mobile_isbn_scanner.ui", line 59, in genesis
File "site-packages/cherrypy/__init__.py", line 160, in quickstart
File "site-packages/cherrypy/process/wspbus.py", line 250, in start
ChannelFailures: TypeError('character mapping must return integer, None or unicode',)
2: I can successfully spin up a simple hello world cherrypy server but it blocks the thread stopping Calibre from loading. So I'm going to need to run cherrypy on another thread which is going to take some research.
Thanks!