NSLS-II / Bug-Reports

Unified issue-tracker for bugs in the data acquisition, management, and analysis software at NSLS-II
BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

cannot get header or table information for a scan in progress #182

Closed ambarb closed 6 years ago

ambarb commented 6 years ago

The scan has several points already written to the database, but it has not yet stopped.

In the past, we were able to plot incoming data. This bug seems to have two consequences

I observe this with databroker '0.8.4'

This time, I used a custom kernal and saw this is still and error with a later version.

databroker: '0.9.3+16.g3841b60c.dirty'

Here is a traceback from that later version. Once the scan is complete, there are no issues.

Bluesky is whatever is deployed at CSX-1.

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-142-992bf87c896f> in <module>()
     10 #ss.extend(list(range(85884,85887)))
     11 for s in ss:
---> 12     table = db.get_table(db[s])
     13     btable = db.get_table(db[s],stream_name='baseline')
     14     X.append(table['pgm_energy_setpoint'])

/home/swilkins/Repos/analysis/databroker/databroker/_core.py in __getitem__(self, key)
   1226                       stop=self.prepare_hook('stop', stop),
   1227                       db=self)
-> 1228                for start, stop in search(key, self)]
   1229         squeeze = not isinstance(key, (set, tuple, MutableSequence, slice))
   1230         if squeeze and len(ret) == 1:

/home/swilkins/Repos/analysis/databroker/databroker/_core.py in <listcomp>(.0)
   1226                       stop=self.prepare_hook('stop', stop),
   1227                       db=self)
-> 1228                for start, stop in search(key, self)]
   1229         squeeze = not isinstance(key, (set, tuple, MutableSequence, slice))
   1230         if squeeze and len(ret) == 1:

/home/swilkins/Repos/analysis/databroker/databroker/_core.py in wrap_in_deprecated_doct(name, doc)
   1056     in the future.
   1057     """
-> 1058     return DeprecatedDoct(DOCT_NAMES[name], doc)
   1059 
   1060 

/home/swilkins/conda_envs/analysis/lib/python3.6/site-packages/doct.py in __init__(self, name, *args, **kwargs)
     71 
     72     def __init__(self, name, *args, **kwargs):
---> 73         super(Document, self).__init__(*args, **kwargs)
     74         super(Document, self).__setitem__('_name', name)
     75         super(Document, self).__setattr__('__dict__', self)

TypeError: 'NoneType' object is not iterable
tacaswell commented 6 years ago

This is fixed by https://github.com/NSLS-II/databroker/pull/303 Pulling the latest master in your env should fix the issue. You are on https://github.com/NSLS-II/databroker/commit/3841b60cf4f1ed1bba5b80d993c85ca5a4af4f7b (+ local changes!) which a few commits out of date.

ambarb commented 6 years ago

FYI @wen-hu