Using Beautiful Soup from a plugin
Hi devs
I am working on a plugin for which I want to use Beautiful Soup. However, my plugin fails on the import:
from bs4 import BeautifulSoup
with:
File "calibre_plugins.magazines.bs4.__init__", line 30, in <module>
File "site-packages/calibre/customize/zipplugin.py", line 179, in load_module
File "calibre_plugins.magazines.bs4.builder.__init_ _", line 4, in <module>
ImportError: No module named bs4.element
This is if I bundle bs4 with the plugin. If I don't, and try to rely on the fact that it is installed in my Python distribution, then I get:
File "calibre_plugins.magazines.worker", line 15, in <module>
ImportError: No module named bs4
Has anyone used bs4 in a plugin and have any tips?
Thanks!
|