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

'Array' object has no attribute 'data' #727

Closed gwbischof closed 2 years ago

gwbischof commented 2 years ago

This code:

db = databroker.from_profile("nsls2", username=None)['chx']['raw'].v1
header2 = db['e909f4a2-12e3-4521-a7a6-be2b728a826b']
header.data("eiger4m_single_image")

Produces this error:

File /nsls2/data/chx/shared/config/prefect_overlay/2022-2.2-py39-tiled/lib/python3.9/site-packages/databroker/v1.py:1047, in Header.data(self, field, stream_name, fill)
   1045 if not fill:
   1046     raise ValueError("Only fill=True is now supported by the data(...) method.")
-> 1047 for item in self._run[stream_name]["data"][field][:].data:
   1048     yield item

AttributeError: 'Array' object has no attribute 'data'