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

timeout error for self.epics_pvs['FPCapture'].put('Done') #127

Open
nikitinvv opened this issue Aug 10, 2021 · 1 comment
Open

timeout error for self.epics_pvs['FPCapture'].put('Done') #127

nikitinvv opened this issue Aug 10, 2021 · 1 comment

Comments

@nikitinvv
Copy link
Contributor

nikitinvv commented Aug 10, 2021

@MarkRivers @decarlof In self.epics_pvs['FPCapture'].put('Done') called in

self.epics_pvs['FPCapture'].put('Done')

I have a timeout error in the streaming mode where capturing is not happening by default. I.e. self.epics_pvs['FPCapture'].put('Done') fails whenever self.epics_pvs['FPCapture']=='Done'.

The error is as follows:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 237, in 'calling callback function'
  File "/local/user2bmb/conda/anaconda/lib/python3.8/site-packages/epics/ca.py", line 709, in _onMonitorEvent
    args.usr(value=value, **kwds)
  File "/local/user2bmb/conda/anaconda/lib/python3.8/site-packages/epics/pv.py", line 767, in __on_changes
    self.run_callbacks()
  File "/local/user2bmb/conda/anaconda/lib/python3.8/site-packages/epics/pv.py", line 48, in wrapped
    return func(self, *args, **kwargs)
  File "/local/user2bmb/conda/anaconda/lib/python3.8/site-packages/epics/pv.py", line 778, in run_callbacks
    self.run_callback(index)
  File "/local/user2bmb/conda/anaconda/lib/python3.8/site-packages/epics/pv.py", line 48, in wrapped
    return func(self, *args, **kwargs)
  File "/local/user2bmb/conda/anaconda/lib/python3.8/site-packages/epics/pv.py", line 801, in run_callback
    fcn(**kwd)
  File "/local/user2bmb/conda/anaconda/lib/python3.8/site-packages/tomoscan-0.1-py3.8.egg/tomoscan/tomoscan.py", line 288, in pv_callback
    self.abort_scan()
  File "/local/user2bmb/conda/anaconda/lib/python3.8/site-packages/tomoscan-0.1-py3.8.egg/tomoscan/tomoscan.py", line 786, in abort_scan
    self.epics_pvs['FPCapture'].put('Done') # VN: for put('Done') I have a timeout error in the streaming mode where capture is not happening by default
  File "/local/user2bmb/conda/anaconda/lib/python3.8/site-packages/epics/pv.py", line 48, in wrapped
    return func(self, *args, **kwargs)
  File "/local/user2bmb/conda/anaconda/lib/python3.8/site-packages/epics/pv.py", line 636, in put
    if value in self._args['enum_strs']:
TypeError: argument of type 'NoneType' is not iterable
2021-08-09 21:56:39,890 - pv_callback pvName=2bma:TomoScanStream:AbortScan, value=0, char_value=No

However, it works fine if instead of put('Done') I set put(0). Why this happens?

@MarkRivers
Copy link
Collaborator

I cannot explain that. Writing 'Done' and writing 0 should be equivalent. I just tested and both worked for me, but I was not testing with tomoscan in stream mode.

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