Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'CatalogOfBlueskyRuns' object has no attribute 'register_handler' #125

Open
burkeds opened this issue Oct 25, 2022 · 1 comment
Open

'CatalogOfBlueskyRuns' object has no attribute 'register_handler' #125

burkeds opened this issue Oct 25, 2022 · 1 comment

Comments

@burkeds
Copy link

burkeds commented Oct 25, 2022

I am trying to follow along with the tutorial section "Array Detector (non-EPICS)" (https://blueskyproject.io/tutorials/Ophyd/04%20-%20Array%20Detector.html).

I am not able to complete the RunEngine section of the tutorial with databroker version '2.0.0b10'

I run this cell in Jupyter

from bluesky import RunEngine
from databroker.v2 import temp

RE = RunEngine()
db = temp()
RE.subscribe(db.v1.insert)

db.register_handler("MY_FORMAT_SPEC", MyHandler)

This returns the following error:
AttributeError: 'CatalogOfBlueskyRuns' object has no attribute 'register_handler'

If I comment out this line, I get the following error when I try to read from the db:
UndefinedAssetSpecification: "Resource document with uid 190a2f02-c27a-441d-98fc-90064f1799ed refers to spec 'MY_FORMAT_SPEC' which is not defined in the Filler's handler registry."

@danielballan
Copy link
Member

Databroker 2.x makes some massive changes, reworking Databroker from a "thick" Python library to a server--client architecture that runs over HTTP.

Most user code is backward-compatible but some aspects (like this one) cannot be done the same way in a server--client architecture. I suggest trying 1.x for now. Once 2.x is released (currently in beta) we'll update the tutorial materials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants