View Single Post
Old 03-30-2011, 09:49 AM   #4
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Hi Kovid,

After days of work I am finally down to the last plugin to be converted, and it is the most complex (Goodreads Sync). However I am having a problem trying to work out how to get the importing to work.

It relies on a library in a folder called “oauth2” which in turn uses another library “httplib2” which is a peer folder (as “httplib2” gets invoked directly by my code too).

I have added these two folders to your interface_demo project to replicate the scenario in simpler code you are familiar with, and added this line to ui.py:
import calibre_plugins.interface_demo.oauth2

The problem occurs within the __init__.py of oauth2, as it in turn on line 32 needs to resolve “import httplib2”.

I have tried all sorts of variations of modifying that line to for instance:
import calibre_plugins.interface_demo.httplib2

but nothing is working.

Help me Obi Wan...
Attached Files
File Type: zip interface_demo.zip (100.7 KB, 507 views)
kiwidude is offline   Reply With Quote