APS-USAXS / usaxs-bluesky-ended-2023

Bluesky instrument for USAXS
0 stars 0 forks source link

Need to catch better Exception and report to users #580

Open jilavsky opened 1 year ago

jilavsky commented 1 year ago

We had Exception error happened to last group of (48 hours) users. This was ar move exception, we have seen these early on, not sure why they disappeared and mainly why they reappeared.

The trouble is, that report on command line looks exactly as if command file ended correctly and users have no clue they are in some arbitrary ar, ax, dx position and that instrument will not work for them. These users tried few preUSAXStunes and when that did not work, gave up since this was end of their beamtime. We need to catch this and deal with it is such way that user is not in trouble. Options

  1. Best would be catch this and try again - ar will eventually get in position...
  2. At least run resetUSAXS for users when any Exception happens - ONLY if we are running USAXS at that time!
  3. And for sure warn them - on command line at the end of output - that there was error (Exception) and stuff is not finished. BS last output is list of UUIDs which were finished and that is usually very long list. No one strolls up to find what happened before that and everyone assumes things finished correctly.
  4. Can we avoid to print the UUID list? It is not human useful

Current Exception

+-----------+------------+------------+------------+------------+                                                                                                      
generator uascan ['9914d3a0'] (scan num: 664)
E Sun-03:49:23 - Exception FailedStatus during attempt 1 of 1 of command '('USAXSscan', ['35', '49', '4', 'Z67L_PSlong_1to1_25mgml'], 31, '      USAXSscan        35      49      4      "Z67L_PSlong_1to1_25mgml"')''
subject: FailedStatus during attempt 1 of 1 of command '('USAXSscan', ['35', '49', '4', 'Z67L_PSlong_1to1_25mgml'], 31, '      USAXSscan        35      49      4      "Z67L_PSlong_1to1_25mgml"')''

date: 2022-12-04 03:49:23.233053
command file: /share1/USAXS_data/2022-11/usaxs.mac
line number: 31
command: ('USAXSscan', ['35', '49', '4', 'Z67L_PSlong_1to1_25mgml'], 31, '      USAXSscan        35      49      4      "Z67L_PSlong_1to1_25mgml"')
raw command:       USAXSscan        35      49      4      "Z67L_PSlong_1to1_25mgml"
attempt: 1 of 1
exception: MoveStatus(done=True, pos=a_stage_r, elapsed=0.2, success=False, settle_time=0.0)
Stopping further processing of this command list.