mapbox / robosat

Semantic segmentation on aerial and satellite imagery. Extracts features such as: buildings, parking lots, roads, water, clouds
MIT License
2.02k stars 383 forks source link

./rs without commands should show help #102

Closed daniel-j-h closed 6 years ago

daniel-j-h commented 6 years ago

Looks like at the moment we don't handle the no-command case gracefully.

./rs
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/robosat/robosat/tools/__main__.py", line 57, in <module>
    args.func(args)
AttributeError: 'Namespace' object has no attribute 'func'

We should show the help printout here or at least not error out internally.

https://github.com/mapbox/robosat/blob/6f26d8586f612d144bf06491fecdbc59913bb508/robosat/tools/__main__.py#L55-L57