Async issue with test_retry_interrupted_scans
https://gitlab.esrf.fr/bliss/bliss/-/jobs/964212
session = <bliss.common.session.Session object at 0x7fdc15ad9e50>
def test_retry_interrupted_scans(session):
"""Create a sequence which a scan which fail.
If catched, we can create a new scan and the sequence is still valid
"""
diode = session.config.get("diode")
def run_sequence(seq_context: SequenceContext):
s1 = scans.loopscan(10, 1, diode, run=False)
try:
with gevent.Timeout(1, TimeoutError):
seq_context.add_and_run(s1)
except TimeoutError:
s2 = scans.loopscan(1, 0.1, diode, run=False)
seq_context.add_and_run(s2)
scan = ScanSequence(runner=run_sequence)
> scan.run()
tests/scans/test_scan_sequence.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan_sequence.py:129: in run
super().run()
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan.py:1289: in run
self._execute_scan_runner(runner)
/opt/conda/envs/default_env/lib/python3.9/contextlib.py:532: in __exit__
raise exc_details[1]
/opt/conda/envs/default_env/lib/python3.9/contextlib.py:517: in __exit__
if cb(*exc_details):
/opt/conda/envs/default_env/lib/python3.9/contextlib.py:126: in __exit__
next(self.gen)
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/common/cleanup.py:290: in capture_exceptions
raise value
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/common/cleanup.py:266: in capture
yield
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan.py:1374: in wrapper
yield
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan.py:1289: in run
self._execute_scan_runner(runner)
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan.py:1361: in _execute_scan_runner
runner.send(
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan.py:334: in send
return self.runner.send(arg)
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan.py:392: in _run
self._gwait(stop_tasks, masked_kill_nb=1)
/opt/conda/envs/default_env/lib/python3.9/contextlib.py:126: in __exit__
next(self.gen)
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/common/cleanup.py:290: in capture_exceptions
raise value
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/common/cleanup.py:266: in capture
yield
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan.py:367: in _run
t.get() # get the task result ; this may raise an exception
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/common/greenlet_utils/killmask.py:197: in get
return super().get(*args, **keys)
src/gevent/greenlet.py:805: in gevent._gevent_cgreenlet.Greenlet.get
???
src/gevent/greenlet.py:373: in gevent._gevent_cgreenlet.Greenlet._raise_exception
???
/opt/conda/envs/default_env/lib/python3.9/site-packages/gevent/_compat.py:49: in reraise
raise value.with_traceback(tb)
src/gevent/greenlet.py:908: in gevent._gevent_cgreenlet.Greenlet.run
???
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan.py:327: in _run_next
for i in next_iter:
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/chain.py:1013: in __next__
next(acq_obj_iter)
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/chain.py:170: in __next__
self.__current_acq_object = next(self.__iterator)
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan_sequence.py:261: in __iter__
self._publish_new_subscan(scan)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> "key": scan._scan_data.key,
"scan_number": int(scan._scan_data.info["scan_nb"]),
}
)
E AttributeError: ('GroupingMaster', "'Scan' object has no attribute '_scan_data'")
/opt/conda/envs/default_env/lib/python3.9/site-packages/bliss/scanning/scan_sequence.py:325: AttributeError