improvement: show nicer error when HPI is not installed
Hi there,
I sucessfully did the install (via a git clone) and go no errors or warnings, but when I try to run a test, I get the following traceback:
➜ orger git:(master) python3 -m orger.modules.instapaper --help
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/mediapathic/Library/Python/3.9/lib/python/site-packages/orger/modules/instapaper.py", line 6, in <module>
from my.instapaper import pages
ModuleNotFoundError: No module named 'my'
I would assume that this has something to do with various old versions of python on my system (a perpetual issue), but calling the test without python3 doesn't work at all, so maybe I'm wrong on that?
Any idea what might be going on here?
Thanks!
Hi, you need an additional package for that (I guess the warning needs to be improved), see https://github.com/karlicoss/HPI/blob/master/doc/SETUP.org#install-main-hpi-package
Ah I see! Well, then, I would like to rename this issue to "Please put the HPI necessity in the 'Install' part of the readme" :)
Thank you!
Sorry to resurrect this but, couldn't HPI be automatically installed as part of the pip install for orger? I didn't for me, but installing manually (in a venv) worked.
No probs about resurrecting, appreciate the effort for searching instead of spamming with new issues :)
It's an optional dependency (since you don't have to use HPI to use orger, only to use HPI modules), and a fairly heavy one, so doesn't really make sense to install by default.
I think an improvement could be to port a helper I have in Promnesia https://github.com/karlicoss/promnesia/blob/master/src/promnesia/sources/hpi.py . It shows a nicer error suggesting to pip install hpi when you're trying to use a promnesia module that depends on HPI, so at least it's immediately obvious what needs to be done