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

CLI does not print table when scanning signal #787

Open
callumforrester opened this issue Jan 17, 2025 · 1 comment
Open

CLI does not print table when scanning signal #787

callumforrester opened this issue Jan 17, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@callumforrester
Copy link
Contributor

If I run a scan with a signal as the "motor" (e.g. the exposure time of a detector), it fails to render a table. See logs from P46 below:

2025-01-17 11:06:23,879 - An exception raised in the callback <function BestEffortCallback.__call__ at 0x7f1da7aa7c40> is being suppressed to not interrupt plan execution.  To investigate try setting the BLUESKY_DEBUG_CALLBACKS env to '1'
Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/bluesky/callbacks/best_effort.py", line 370, in descriptor
    fields = doc.get("hints", {}).get(obj_name, {})["fields"]
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'fields'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/bluesky/callbacks/core.py", line 65, in inner
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/bluesky/callbacks/best_effort.py", line 103, in __call__
    super().__call__(name, doc, *args, **kwargs)
  File "/venv/lib/python3.11/site-packages/bluesky/callbacks/mpl_plotting.py", line 80, in __call__
    return CallbackBase.__call__(self, name, doc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/event_model/__init__.py", line 191, in __call__
    return self._dispatch(name, doc, validate)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/event_model/__init__.py", line 199, in _dispatch
    output_doc = getattr(self, name)(doc)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/bluesky/callbacks/best_effort.py", line 372, in descriptor
    fields = doc["object_keys"][obj_name]
             ~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'det-drv-acquire_time'

Steps To Reproduce

Steps to reproduce the behaviour:

  1. Run a spec_scan with a detector exposure time as the signal

Acceptance Criteria

  • Runing a spec_scan with a detector exposure time as the signal produces a table
@callumforrester callumforrester added the bug Something isn't working label Jan 17, 2025
@callumforrester
Copy link
Contributor Author

This could also be an upstream issue with bluesky, more investigation is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant