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

Abort behaviour can result in janky data frames. #13

Open
SeanCGriffin opened this issue Apr 20, 2023 · 1 comment
Open

Abort behaviour can result in janky data frames. #13

SeanCGriffin opened this issue Apr 20, 2023 · 1 comment

Comments

@SeanCGriffin
Copy link
Collaborator

No description provided.

@SeanCGriffin
Copy link
Collaborator Author

Aborting may also fail; need a better way to exit:


[16:14:06] - [INFO] - root [main:104] - Opening tst.txt for data logging.
[16:14:06] - [INFO] - pywub.control [binary_batchmode_recv:572] - Issuing batchmode send with ntosend = 10 and modenostop = 1
[16:14:06] - [INFO] - pywub.control [binary_batchmode_recv:577] - ***   CMD_RC: CMD_RC_OK
[16:14:06] - [INFO] - pywub.control [binary_batchmode_recv:595] - Note: data storage being done using 'sb' method.
[16:14:07] - [INFO] - root [main:137] - Progress: 2.3000e+02 bytes -- bytes in_waiting: 0
[16:14:08] - [INFO] - root [main:137] - Progress: 2.3000e+02 bytes -- bytes in_waiting: 0
[16:14:09] - [INFO] - root [main:137] - Progress: 2.3000e+02 bytes -- bytes in_waiting: 0
[16:14:09] - [WARNING] - root [main:140] - No new data in the last second.
[16:14:10] - [INFO] - root [main:137] - Progress: 2.3000e+02 bytes -- bytes in_waiting: 0
[16:14:10] - [WARNING] - root [main:140] - No new data in the last second.
[16:14:11] - [INFO] - root [main:137] - Progress: 2.3000e+02 bytes -- bytes in_waiting: 0
[16:14:11] - [WARNING] - root [main:140] - No new data in the last second.
[16:14:12] - [INFO] - root [main:137] - Progress: 2.3000e+02 bytes -- bytes in_waiting: 0
[16:14:12] - [WARNING] - root [main:140] - No new data in the last second.
[16:14:13] - [INFO] - root [main:137] - Progress: 2.3000e+02 bytes -- bytes in_waiting: 0
[16:14:13] - [WARNING] - root [main:140] - No new data in the last second.
[16:14:14] - [INFO] - root [main:137] - Progress: 2.3000e+02 bytes -- bytes in_waiting: 0
[16:14:14] - [WARNING] - root [main:140] - No new data in the last second.
^C[16:14:15] - [INFO] - root [main:149] - KeyboardInterrupt detected. Exiting batch readout.
[16:14:15] - [INFO] - pywub.control [binary_batchmode_recv:600] - Abort requested. This may leave the wuBase in a weird state.
Exception in thread Thread-1 (batchmode_recv):
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 787, in batchmode_recv
    return self.binary_batchmode_recv(ntosend, modenostop, datafile)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 602, in binary_batchmode_recv
    self.binary_stop_batch()
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 558, in binary_stop_batch
    resp_rc = resp[-1]             
              ~~~~^^^^
IndexError: index out of range
Traceback (most recent call last):
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/./run_wub_daq.py", line 294, in <module>
    main(cli_args)
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/./run_wub_daq.py", line 159, in main
    logger.info(wubctl.cmd_ok())
                ^^^^^^^^^^^^^^^
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 195, in new_method
    return self.send_recv(command, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 447, in send_recv
    resp = self.send_recv_binary(command, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 419, in send_recv_binary
    response = self.unpack_readback(command, readback[-(cmd_return_args_size + 1)::])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 318, in unpack_readback
    cmd_return_code = readback[-1]
                      ~~~~~~~~^^^^
IndexError: index out of range
[16:14:18] - [INFO] - pywub.control [__del__:214] - Reverting to ASCII mode.
Exception ignored in: <function wubCTL.__del__ at 0x7f3023428ae0>
Traceback (most recent call last):
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 215, in __del__
    self.cmd_asciimode()
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 195, in new_method
    return self.send_recv(command, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 447, in send_recv
    resp = self.send_recv_binary(command, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 419, in send_recv_binary
    response = self.unpack_readback(command, readback[-(cmd_return_args_size + 1)::])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sgriffin/work/LOM/wubase/wuBase-python/pywub/control.py", line 318, in unpack_readback
    cmd_return_code = readback[-1]
                      ~~~~~~~~^^^^
IndexError: index out of range

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

1 participant