posativ / acrylamid

(unmaintained) static blog generator in python with incremental rendering ⛺
http://posativ.org/acrylamid/
Other
277 stars 40 forks source link

Poor user experience when run with no subcommand #255

Open larsks opened 5 years ago

larsks commented 5 years ago

Running acrylamid by itself results in:

'acrylamid.tasks.imprt' ImportError: cannot import name 'HTMLParseError'
Traceback (most recent call last):
  File "/home/lars/projects/blog.oddbit.com/.acr/lib/python3.6/site-packages/acrylamid/helpers.py", line 421, in discover                                                                     
    mod = sys.modules[modname]
KeyError: 'acrylamid.tasks.imprt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lars/projects/blog.oddbit.com/.acr/lib/python3.6/site-packages/acrylamid/helpers.py", line 424, in discover                                                                     
    mod = imp.load_module(modname, fp, path, descr)
  File "/home/lars/projects/blog.oddbit.com/.acr/lib64/python3.6/imp.py", line 235, in load_module                                                                                            
    return load_source(name, filename, file)
  File "/home/lars/projects/blog.oddbit.com/.acr/lib64/python3.6/imp.py", line 172, in load_source                                                                                            
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/lars/projects/blog.oddbit.com/.acr/lib/python3.6/site-packages/acrylamid/tasks/imprt.py", line 32, in <module>                                                                  
    from acrylamid.lib.html import unescape
  File "/home/lars/projects/blog.oddbit.com/.acr/lib/python3.6/site-packages/acrylamid/lib/html.py", line 24, in <module>                                                                     
    from html.parser import HTMLParser as DefaultParser, HTMLParseError
ImportError: cannot import name 'HTMLParseError'
   critical  No such command!

It would be nice to have this output a usage message instead.