NSLS-II / metadatastore

DEPRECATED: Incorporated into https://github.com/NSLS-II/databroker
Other
2 stars 11 forks source link

BUG: NoEventDescriptors error at XPD #254

Closed CJ-Wright closed 7 years ago

CJ-Wright commented 7 years ago
In [9]: a = db()
---------------------------------------------------------------------------
NoEventDescriptors                        Traceback (most recent call last)
/home/cwright/anaconda/envs/dp/lib/python3.5/site-packages/databroker/core.py in from_run_start(cls, mds, run_start, verify_integrity)
     92                         for ev_desc in
---> 93                         mds.descriptors_by_start(run_start_uid)]
     94         except mds.NoEventDescriptors:

/home/cwright/anaconda/envs/dp/lib/python3.5/site-packages/metadatastore/mds.py in descriptors_by_start(self, run_start)
    302                                               self._runstart_col,
--> 303                                               self._RUNSTART_CACHE)
    304 

/home/cwright/anaconda/envs/dp/lib/python3.5/site-packages/metadatastore/core.py in descriptors_by_start(run_start, descriptor_col, descriptor_cache, run_start_col, run_start_cache)
    329         raise NoEventDescriptors("No EventDescriptors exists "
--> 330                                  "for {!r}".format(run_start))
    331 

NoEventDescriptors: No EventDescriptors exists for '16416167-9a5e-4bf7-8129-4416490c0d6e'

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
<ipython-input-9-0ec8b63ab10a> in <module>()
----> 1 a = db()

/home/cwright/anaconda/envs/dp/lib/python3.5/site-packages/databroker/broker.py in __call__(self, text_search, **kwargs)
    444         headers = []
    445         for rs in run_start:
--> 446             header = Header.from_run_start(self.mds, rs)
    447             if data_key is None:
    448                 headers.append(header)

/home/cwright/anaconda/envs/dp/lib/python3.5/site-packages/databroker/core.py in from_run_start(cls, mds, run_start, verify_integrity)
     92                         for ev_desc in
     93                         mds.descriptors_by_start(run_start_uid)]
---> 94         except mds.NoEventDescriptors:
     95             ev_descs = []
     96 

AttributeError: 'MDSRO' object has no attribute 'NoEventDescriptors'
CJ-Wright commented 7 years ago

@danielballan

ghost commented 7 years ago

What version of mds are you using?

CJ-Wright commented 7 years ago
databroker                0.6.2                    py35_0    https://pergamon.cs.nsls2.local:8443/conda/nsls2-tag/linux-64/databroker-0.6.2-py35_0.tar.bz2

metadatastore             0.6.0                    py35_0    https://pergamon.cs.nsls2.local:8443/conda/nsls2-tag/linux-64/metadatastore-0.6.0-py35_0.tar.bz2
danielballan commented 7 years ago

Recent versions of databroker expect metadatastore to provide this exception as an attribute. This was added to metadatastore in this commit: 6cdeb79e58b06a4787bccb9670e673ff86189e61 and first release in metadatastore v0.6.2. Portable-mds will support this as soon as this is merged: https://github.com/NSLS-II/portable-mds/pull/6

CJ-Wright commented 7 years ago

So I should update databroker or install from source?

danielballan commented 7 years ago

You should update metadatastore to >= v0.6.2. Might as well go with the latest tagged version, which I believe is v0.6.3. I'm pretty sure the collection env on the XPD workstation that they use for data collection is already up-to-date, so I assume we are talking about a different conda environment under your management.

You might want to update everything while you are at it, to stay in sync. Best remove the env and remake, as we also upgraded from Python 3.4 to 3.5

conda create -n collection collection