pcdshub / pcdshub/hutch-python

LiveTable failed to format row

Open
#331 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1
Forks
18
Avg merge
7d 9h
Merged PRs (30d)
1

Description

Expected Behavior

Live table shouldn't fail to format a row.

Current Behavior

LiveTable occasionally has issues formatting rows. We saw this first in a slack thread James Cryan in bp.list_scan.

Later seen by me in bp.adaptive_scan

This does not stop the scan from running, just breaks the terminal outputs. Originates from this exception catch.

Possible Solution

??? Possibly something to do with floats and ints?

Steps to Reproduce (for bugs)

In [3]: from bluesky.plans import adaptive_scan
   ...: from ophyd.sim import motor, det
   ...:
   ...: RE(adaptive_scan([det], 'det', motor,
   ...:                  start=-15,
   ...:                  stop=10,
   ...:                  min_step=0.01,
   ...:                  max_step=5.,
   ...:                  target_delta=.05,
   ...:                  backstep=True))


Transient Scan ID: 2     Time: 2022-04-19 13:33:54
Persistent Unique Scan ID: '22ecca5f-4be2-4645-ad7c-f557d3a4db61'
New stream: 'primary'
+-----------+------------+------------+------------+
|   seq_num |       time |      motor |        det |
+-----------+------------+------------+------------+
|         1 | 13:33:54.2 |        -15 |   1.39e-49 |
 failed to format row
 failed to format row
 failed to format row

RE(bp.list_scan([daq], photon_energy, list1))
image
(resolved by defining the list as floats, not int)

Context

Your Environment

pcds-5.3.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the exception catch in bluesky/callbacks/core.py at the linked lines, then reproduce the failure using adaptive_scan and list_scan as shown. Compare the row values that trigger the error, including the reported int-versus-float difference. Done means LiveTable formats these rows without printing “failed to format row” while the scan continues normally.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.