bluesky / databroker

Unified API pulling data from multiple sources
https://blueskyproject.io/databroker
BSD 3-Clause "New" or "Revised" License
35 stars 46 forks source link

ImportError: cannot import name 'Catalog' from 'databroker.mongo_normalized' #725

Closed st3107 closed 2 years ago

st3107 commented 2 years ago

Expected Behavior

A DB should be initialized without a bug.

databroker.v2.temp()

Current Behavior

Loading from packaged simulation configuration
Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/xpdconf_1660241225258/test_tmp/run_test.py", line 5, in <module>
    import xpdconf.conf
  File "/home/conda/feedstock_root/build_artifacts/xpdconf_1660241225258/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.9/site-packages/xpdconf/conf.py", line 159, in <module>
    glbl_dict["exp_db"] = databroker.v2.temp()
  File "/home/conda/feedstock_root/build_artifacts/xpdconf_1660241225258/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.9/site-packages/databroker/v2.py", line 17, in temp
    from .mongo_normalized import Catalog
ImportError: cannot import name 'Catalog' from 'databroker.mongo_normalized' (/home/conda/feedstock_root/build_artifacts/xpdconf_1660241225258/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.9/site-packages/databroker/mongo_normalized.py)
Tests failed for xpdconf-0.4.5-pyhd8ed1ab_1.tar.bz2 - moving package to /home/conda/feedstock_root/build_artifacts/broken
WARNING:conda_build.build:Tests failed for xpdconf-0.4.5-pyhd8ed1ab_1.tar.bz2 - moving package to /home/conda/feedstock_root/build_artifacts/broken
TESTS FAILED: xpdconf-0.4.5-pyhd8ed1ab_1.tar.bz2

Possible Solution

It may be related to the conda recipe of tiled.

Steps to Reproduce (for bugs)

  1. Install databroker 2.0.0b from conda-forge
  2. run databroker.v2.temp() in python

Context

Build package dependent on databroker in conda-forge.

Your Environment

tiled-sparse:                  0.1.0a67-hd8ed1ab_0          conda-forge
tiled-xarray:                  0.1.0a67-hd8ed1ab_0          conda-forge
tk:                            8.6.12-h27826a3_0            conda-forge
toolz:                         0.12.0-pyhd8ed1ab_0          conda-forge
tornado:                       6.1-py39hb9d737c_3           conda-forge
typer:                         0.6.1-pyhd8ed1ab_0           conda-forge
typing-extensions:             4.3.0-hd8ed1ab_0             conda-forge
typing_extensions:             4.3.0-pyha770c72_0           conda-forge
tzdata:                        2022a-h191b570_0             conda-forge
tzlocal:                       4.2-py39hf3d152e_1           conda-forge
urllib3:                       1.26.11-pyhd8ed1ab_0         conda-forge
uvicorn:                       0.18.2-py39hf3d152e_2        conda-forge
watchgod:                      0.8.2-pyhd8ed1ab_0           conda-forge
wcwidth:                       0.2.5-pyh9f0ad1d_2           conda-forge
xarray:                        2022.6.0-pyhd8ed1ab_1        conda-forge
xorg-libxau:                   1.0.9-h7f98852_0             conda-forge
xorg-libxdmcp:                 1.1.3-h7f98852_0             conda-forge
xpdconf:                       0.4.5-pyhd8ed1ab_1           local      
xz:                            5.2.5-h516909a_1             conda-forge
yaml:                          0.2.5-h7f98852_2             conda-forge
zfp:                           1.0.0-h27087fc_1             conda-forge
zict:                          2.2.0-pyhd8ed1ab_0           conda-forge
zipp:                          3.8.1-pyhd8ed1ab_0           conda-forge
zlib:                          1.2.12-h166bdaf_2            conda-forge
zlib-ng:                       2.0.6-h166bdaf_0             conda-forge
zstd:                          1.5.2-h8a70e8d_3             conda-forge
danielballan commented 2 years ago

Thanks for the report @st3107. Fix submitted in https://github.com/bluesky/databroker/pull/726.