BCDA-APS / use_bluesky

Tools to help APS use the Bluesky Framework (https://blueskyproject.io/)
8 stars 3 forks source link

KeyError from ./make_catalog.py #87

Closed prjemian closed 3 years ago

prjemian commented 3 years ago
(base) jemian@wow ~ $ pushd ~/Documents/projects/BCDA-APS/use_bluesky/admin/
~/Documents/projects/BCDA-APS/use_bluesky/admin ~
(bluesky_2021_1) jemian@wow ~/.../use_bluesky/admin $ ./make_catalog.py s100apps.xray.aps.anl.gov 3idb
wrote: /home/beams1/JEMIAN/Documents/projects/BCDA-APS/use_bluesky/admin/3idb.yml
Traceback (most recent call last):
  File "./make_catalog.py", line 157, in <module>
    main()
  File "./make_catalog.py", line 153, in main
    setup(args)
  File "./make_catalog.py", line 147, in setup
    count = one_time_setup(args)
  File "./make_catalog.py", line 113, in one_time_setup
    cat = databroker.catalog[db_name]
  File "/home/beams/JEMIAN/.conda/envs/bluesky_2021_1/lib/python3.8/site-packages/intake/catalog/base.py", line 410, in __getitem__
    raise KeyError(key)
KeyError: '3idb'
prjemian commented 3 years ago

Probably because the new catalog YAML file is not found since it is not in one of the canonical directories where it is expected. If that is the case, can trap for it, issue a warning, and then add the directory to search path, then try again.

prjemian commented 3 years ago

Since it is now very easy to create an intake-style catalog, and the associated mongodb database requires no initialization, this code can be discarded as not necessary.