You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last thing I had on the docket here was to try and toss the archapp calls into a thread, in order to free up the gui while PV's were being added to the archive viewer. I tried a few things, but ended up hitting upon the fact that python's signal only works in the main thread of the main interpreter. 😞
traceback
Traceback (most recent call last):
File "/cds/home/r/roberttk/devrepos/atef/atef/qt_helpers.py", line 332, in run
self.return_value = self.func(*self.args, **self.kwargs)
File "/cds/home/r/roberttk/devrepos/atef/atef/widgets/config/data.py", line 267, in add_sig
widget.add_signal(pv, dev_attr=dev_attr, update_curves=False)
File "/cds/home/r/roberttk/devrepos/atef/atef/widgets/archive_viewer.py", line 314, in add_signal
data = self.get_pv_data_snippet(pv)
File "/cds/home/r/roberttk/devrepos/atef/atef/widgets/archive_viewer.py", line 348, in get_pv_data_snippet
data = self.archapp._data.get_raw(pv, prev, today)
File "/cds/home/r/roberttk/devrepos/archapp/archapp/data.py", line 166, in get_raw
data = get_json(url)
File "/cds/home/r/roberttk/devrepos/archapp/archapp/url.py", line 70, in get_json
signal.signal(signal.SIGALRM, _raise_timeout)
File "/cds/group/pcds/pyps/conda/py39/envs/pcds-5.5.1/lib/python3.9/signal.py", line 56, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread of the main interpreter
perhaps a deeper rework of archapp could help, but at least for now caching should make this less painful on repeat archive-viewer openings?
traceback
Originally posted by @tangkong in pcdshub/atef#132 (comment)
The text was updated successfully, but these errors were encountered: