Closed prjemian closed 4 years ago
Testing databroker 1.0.5 in a custom environment, this seems to resolve the problem.
(/share1/bluesky/conda_envs/broker) usaxs@usaxscontrol /share1/USAXS_data $ ll ~/.config/databroker/
total 0
lrwxrwxrwx 1 usaxs 57 Jan 9 2018 mongodb_config.yml -> ../../.ipython/profile_bluesky/startup/mongodb_config.yml
(/share1/bluesky/conda_envs/broker) usaxs@usaxscontrol /share1/USAXS_data $ $CONDA_PREFIX/bin/python
Python 3.8.3 (default, May 19 2020, 18:47:26)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import databroker
>>> db = databroker.Broker.named("/home/beams/USAXS/.config/databroker/mongodb_config.yml")
>>> db[-1]
<databroker.v1.Header object at 0x7f69981b97f0>
>>> h = _
@jilavsky : An upgrade of databroker should fix this. Let me know when you are ready.
We can do this upgrade this evening when SPEC is running overnight.
Done.
Wow! Figure this out. Successful scan set ended with:
but could not mine the
db
for the last scan.exception trace and console session
``` In [4]: h = db[-1] --------------------------------------------------------------------------- KeyError Traceback (most recent call last) /share1/bluesky/conda_envs/bluesky_2020_5/lib/python3.7/site-packages/cachetools/cache.py in __getitem__(self, key) 38 try: ---> 39 return self.__data[key] 40 except KeyError: KeyError: '882d9a67432910a8c6359bc4fcb6f22f' During handling of the above exception, another exception occurred: KeyError Traceback (most recent call last) /share1/bluesky/conda_envs/bluesky_2020_5/lib/python3.7/site-packages/databroker/core.py in get(self, **kwargs) 229 try: --> 230 datasource = self.__cache[token] 231 logger.debug( /share1/bluesky/conda_envs/bluesky_2020_5/lib/python3.7/site-packages/cachetools/lru.py in __getitem__(self, key, cache_getitem) 13 def __getitem__(self, key, cache_getitem=Cache.__getitem__): ---> 14 value = cache_getitem(self, key) 15 self.__update(key) /share1/bluesky/conda_envs/bluesky_2020_5/lib/python3.7/site-packages/cachetools/cache.py in __getitem__(self, key) 40 except KeyError: ---> 41 return self.__missing__(key) 42 /share1/bluesky/conda_envs/bluesky_2020_5/lib/python3.7/site-packages/cachetools/cache.py in __missing__(self, key) 67 def __missing__(self, key): ---> 68 raise KeyError(key) 69 KeyError: '882d9a67432910a8c6359bc4fcb6f22f' During handling of the above exception, another exception occurred: AttributeError Traceback (most recent call last)