CivicSpleen / ambry

A comprehensive data package manager
BSD 2-Clause "Simplified" License
4 stars 5 forks source link

AttributeError: 'NoneType' object has no attribute 'as_dataset' if bundle ref is not in the history. #183

Open nmb10 opened 8 years ago

nmb10 commented 8 years ago

It's hard to understand what does the error mean. Add better message.

How to reproduce:

  1. Start new shell
  2. Execute info command
bambry info -w

Error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/nmb10/projects/ambry_project/ambry/cli/__main__.py", line 5, in <module>
    main(sys.argv)
  File "ambry/cli/__init__.py", line 201, in main
    run_command(args, rc)
  File "ambry/cli/bundle.py", line 472, in run_command
    globals()['bundle_' + args.subcommand](args, l, rc)
  File "ambry/cli/bundle.py", line 558, in bundle_info
    b = l.bundle(ref)
  File "ambry/library/__init__.py", line 249, in bundle
    p = self.partition(ref)
  File "ambry/library/__init__.py", line 284, in partition
    ds_on = on.as_dataset
AttributeError: 'NoneType' object has no attribute 'as_dataset'