mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-12 05:06:36 +08:00
Michael Birtwell
b895846322
Artiq assumes that all exceptions raised by the kernel can be constructed with a single string argument. This isn't always the case. Especially for exceptions that originated in python and were propagated to the kernel over rpc. With out this change a mosek solver failure looks like: ``` ERROR root:logging_tools.py:41 Terminating with exception (TypeError: __init__() missing 1 required positional argument: 'msg') Traceback (most recent call last): File "/home/mb/.cache/pypoetry/virtualenvs/ion-transport-1-b41LI0-py3.8/lib/python3.8/site-packages/artiq/master/worker_impl.py", line 540, in main exp_inst.run() File "/home/mb/.cache/pypoetry/virtualenvs/ion-transport-1-b41LI0-py3.8/lib/python3.8/site-packages/artiq/test_tools/experiment.py", line 82, in wrapper meth() File "/home/mb/.cache/pypoetry/virtualenvs/ion-transport-1-b41LI0-py3.8/lib/python3.8/site-packages/artiq/language/core.py", line 54, in run_on_core return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs) File "/home/mb/.cache/pypoetry/virtualenvs/ion-transport-1-b41LI0-py3.8/lib/python3.8/site-packages/artiq/coredevice/core.py", line 152, in run self.comm.serve(embedding_map, symbolizer, demangler) File "/home/mb/.cache/pypoetry/virtualenvs/ion-transport-1-b41LI0-py3.8/lib/python3.8/site-packages/artiq/coredevice/comm_kernel.py", line 720, in serve self._serve_exception(embedding_map, symbolizer, demangler) File "/home/mb/.cache/pypoetry/virtualenvs/ion-transport-1-b41LI0-py3.8/lib/python3.8/site-packages/artiq/coredevice/comm_kernel.py", line 699, in _serve_exception python_exn = python_exn_type( TypeError: __init__() missing 1 required positional argument: 'msg' ``` With this change we get: ``` ERROR root:logging_tools.py:41 Terminating with exception (RuntimeError: Exception type=<class 'mosek.Error'>, which couldn't be reconstructed (__init__() missing 1 required positional argument: 'msg')) Core Device Traceback: Traceback (most recent call first): File "/home/mb/oxionics/ion-transport/tests/test_end_to_end.py", line 280, in get_transport return self.seq.solve() File "/home/mb/oxionics/ion-transport/tests/test_end_to_end.py", line 288, in artiq_worker_test_end_to_end.TransportTestScan.run(..., ...) (RA=+0x2e4) self.seq.record(self.get_transport(1e-6 + 1e-7 * x)) mosek.Error(27): rescode.err_license_expired(1001): The license has expired. End of Core Device Traceback Traceback (most recent call last): File "/home/mb/oxionics/artiq/artiq/master/worker_impl.py", line 540, in main exp_inst.run() File "/home/mb/oxionics/artiq/artiq/test_tools/experiment.py", line 82, in wrapper meth() File "/home/mb/oxionics/artiq/artiq/language/core.py", line 54, in run_on_core return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs) File "/home/mb/oxionics/artiq/artiq/coredevice/core.py", line 152, in run self.comm.serve(embedding_map, symbolizer, demangler) File "/home/mb/oxionics/artiq/artiq/coredevice/comm_kernel.py", line 732, in serve self._serve_exception(embedding_map, symbolizer, demangler) File "/home/mb/oxionics/artiq/artiq/coredevice/comm_kernel.py", line 714, in _serve_exception raise python_exn RuntimeError: Exception type=<class 'mosek.Error'>, which couldn't be reconstructed (__init__() missing 1 required positional argument: 'msg') ``` Signed-off-by: Michael Birtwell <michael.birtwell@oxionics.com> |
||
---|---|---|
.. | ||
__init__.py | ||
ad53xx.py | ||
ad9154_reg.py | ||
ad9154_spi.py | ||
ad9910.py | ||
ad9912_reg.py | ||
ad9912.py | ||
ad9914.py | ||
adf5356_reg.py | ||
adf5356.py | ||
basemod_att.py | ||
cache.py | ||
comm_analyzer.py | ||
comm_kernel.py | ||
comm_mgmt.py | ||
comm_moninj.py | ||
core.py | ||
coredevice_generic.schema.json | ||
dac34h84.py | ||
dma.py | ||
edge_counter.py | ||
exceptions.py | ||
fastino.py | ||
fmcdio_vhdci_eem.py | ||
grabber.py | ||
i2c.py | ||
jsondesc.py | ||
kasli_i2c.py | ||
mirny.py | ||
novogorny.py | ||
phaser.py | ||
rtio.py | ||
runtime.py | ||
sampler.py | ||
sawg.py | ||
shiftreg.py | ||
spi2.py | ||
spline.py | ||
suservo.py | ||
trf372017.py | ||
ttl.py | ||
urukul.py | ||
zotino.py |