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
Very limited parts of DAXA use a new Python feature (introduced in 3.11, backported by exceptiongroup module), that allows me to raise a set of exceptions together.
Specifically this is used when Python errors occur during the parallel tasks that run command line SAS tools (and possibly other telescope specific command line tools in the future) - to be clear Python errors shouldn't happen in those parallelised tasks, but if they do an ExceptionGroup is used.
It seems that at the moment (this is true on my setup on the date this issue was created) that Jupyter notebooks do not show the tracebacks properly for ExceptionGroup. For instance in the notebook a test raised ExceptionGroup gives this traceback:
ExceptionGroup: pythony errors (3 sub-exceptions)
Whereas in a script run from terminal this is what you get (and should get):
Exception Group Traceback (most recent call last):
| File "/Users/dt237/code/test_daxa/testo.py", line 12, in
| success, errors, outs = cif_build(arch)
| ^^^^^^^^^^^^^^^
| File "/Users/dt237/code/DAXA/daxa/process/xmm/_common.py", line 209, in wrapper
| raise ExceptionGroup("pythony errors", python_errors)
| ExceptionGroup: pythony errors (3 sub-exceptions)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/opt/anaconda3/envs/daxa_dev/lib/python3.11/multiprocessing/pool.py", line 125, in worker
| result = (True, func(*args, **kwds))
| ^^^^^^^^^^^^^^^^^^^
| File "/Users/dt237/code/DAXA/daxa/process/xmm/_common.py", line 89, in execute_cmd
| print(boi)
| ^^^
| NameError: name 'boi' is not defined
+---------------- 2 ----------------
| Traceback (most recent call last):
| File "/opt/anaconda3/envs/daxa_dev/lib/python3.11/multiprocessing/pool.py", line 125, in worker
| result = (True, func(*args, **kwds))
| ^^^^^^^^^^^^^^^^^^^
| File "/Users/dt237/code/DAXA/daxa/process/xmm/_common.py", line 89, in execute_cmd
| print(boi)
| ^^^
| NameError: name 'boi' is not defined
+---------------- 3 ----------------
| Traceback (most recent call last):
| File "/opt/anaconda3/envs/daxa_dev/lib/python3.11/multiprocessing/pool.py", line 125, in worker
| result = (True, func(*args, **kwds))
| ^^^^^^^^^^^^^^^^^^^
| File "/Users/dt237/code/DAXA/daxa/process/xmm/_common.py", line 89, in execute_cmd
| print(boi)
| ^^^
| NameError: name 'boi' is not defined
+------------------------------------
So just be aware of that!
The text was updated successfully, but these errors were encountered:
Very limited parts of DAXA use a new Python feature (introduced in 3.11, backported by exceptiongroup module), that allows me to raise a set of exceptions together.
Specifically this is used when Python errors occur during the parallel tasks that run command line SAS tools (and possibly other telescope specific command line tools in the future) - to be clear Python errors shouldn't happen in those parallelised tasks, but if they do an ExceptionGroup is used.
It seems that at the moment (this is true on my setup on the date this issue was created) that Jupyter notebooks do not show the tracebacks properly for ExceptionGroup. For instance in the notebook a test raised ExceptionGroup gives this traceback:
ExceptionGroup: pythony errors (3 sub-exceptions)
Whereas in a script run from terminal this is what you get (and should get):
| File "/Users/dt237/code/test_daxa/testo.py", line 12, in
| success, errors, outs = cif_build(arch)
| ^^^^^^^^^^^^^^^
| File "/Users/dt237/code/DAXA/daxa/process/xmm/_common.py", line 209, in wrapper
| raise ExceptionGroup("pythony errors", python_errors)
| ExceptionGroup: pythony errors (3 sub-exceptions)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "/opt/anaconda3/envs/daxa_dev/lib/python3.11/multiprocessing/pool.py", line 125, in worker
| result = (True, func(*args, **kwds))
| ^^^^^^^^^^^^^^^^^^^
| File "/Users/dt237/code/DAXA/daxa/process/xmm/_common.py", line 89, in execute_cmd
| print(boi)
| ^^^
| NameError: name 'boi' is not defined
+---------------- 2 ----------------
| Traceback (most recent call last):
| File "/opt/anaconda3/envs/daxa_dev/lib/python3.11/multiprocessing/pool.py", line 125, in worker
| result = (True, func(*args, **kwds))
| ^^^^^^^^^^^^^^^^^^^
| File "/Users/dt237/code/DAXA/daxa/process/xmm/_common.py", line 89, in execute_cmd
| print(boi)
| ^^^
| NameError: name 'boi' is not defined
+---------------- 3 ----------------
| Traceback (most recent call last):
| File "/opt/anaconda3/envs/daxa_dev/lib/python3.11/multiprocessing/pool.py", line 125, in worker
| result = (True, func(*args, **kwds))
| ^^^^^^^^^^^^^^^^^^^
| File "/Users/dt237/code/DAXA/daxa/process/xmm/_common.py", line 89, in execute_cmd
| print(boi)
| ^^^
| NameError: name 'boi' is not defined
+------------------------------------
So just be aware of that!
The text was updated successfully, but these errors were encountered: