SystemError: error return without exception set

Larry Martell larry.martell at gmail.com
Thu Dec 7 10:46:17 EST 2017


On Thu, Dec 7, 2017 at 10:36 AM, Natalie Leung
<natalieleung.29 at gmail.com> wrote:
> I am trying to use Python to communicate and send commands in MSC Marc. A part of the code looks something like this:
>
> from py_mentat import*
>
> directory = '[specified the file path to my model]'
> marcModel = '[name of my model]'
>
> py_echo(0)
> openModel = '*new_model yes *open_model "'+ directory + marcModel +'"'
> py_send(openModel)
>
>
> The code stops at "py_send(openModel)" with an error message that reads: Traceback (most recent call last): File "[my file path]", line 11, in py_send(openModel)
> SystemError: error return without exception set
>
> I tried running the code on different platforms (e.g. Command Prompt, Wing 101, python.exe) and I get the same result. What could be the problem?

Faced with this I would use the debugger to break on the py_send line
and then step into that function, and then step through it, e.g.:

python -m pdb your_script.py
b 8 [ or whatever the py_send line is)
c [to continue to the BP)
s [to step into py_send]

then step through the function and something more informative may be revealed.



More information about the Python-list mailing list