<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Tue, Jul 3, 2018, 05:01 Tom Cook <<a href="mailto:tom.k.cook@gmail.com">tom.k.cook@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I have a remote sensing platform that uses Numpy on a raspberry pi.  There are about a dozen of these installed.  Three days ago, the Python part of the software started crashing during startup, with this exception message:</div><div><br></div><div>Traceback (most recent call last):<br>  File "/home/azi/board/sensor_logger.py", line 16, in <module><br>    from board.measurement.data import Expression, MeasurementData<br>  File "/home/azi/board/measurement/data.py", line 2, in <module><br>    import numpy as np<br>  File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 153, in <module><br>    from . import add_newdocs<br>  File "/usr/lib/python3/dist-packages/numpy/add_newdocs.py", line 13, in <module><br>    from numpy.lib import add_newdoc<br>  File "/usr/lib/python3/dist-packages/numpy/lib/__init__.py", line 8, in <module><br>    from .type_check import *<br>  File "/usr/lib/python3/dist-packages/numpy/lib/type_check.py", line 11, in <module><br>    import numpy.core.numeric as _nx<br>  File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 7, in <module><br>    from . import umath<br>SystemError: initialization of umath raised unreported exception<br></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">And the C level, reporting an exception to the python interpreter involves two steps: (1) stashing the exception object in a special global variable where the interpreter knows to look for it, (2) returning a special value (usually -1 or NULL) that tells the interpreter an exception has been raised and it should go look at that global variable for more details.</div><div dir="auto"><br></div><div dir="auto">I *think* that error means that the umath initialization routine did step (1), but not step (2), and the interpreter is cranky because it doesn't know how to interpret this. (Unfortunately I don't have a copy of py34 on my phone to confirm...)</div><div dir="auto"><br></div><div dir="auto">If that's correct, though, then probably the next thing you want to do is figure out what exception is being set, since that's likely to be the real error. It's annoying that python doesn't tell you. It should be possible to dig around with gdb and figure it out, but will require some knowledge of the python C API and gdb and I don't know the recipe offhand.</div><div dir="auto"><br></div><div dir="auto">Are you having the same problem on all the installations?</div><div dir="auto"><br></div><div dir="auto">-n</div></div>