Ask Your Question

SystemError: error return without exception set

asked 2017-12-04 13:09:00 -0500

nl3's avatar

updated 2019-03-13 10:02:55 -0500

I am attempting to use Python with MSC Marc. As I am using "py_send" to open a model file on Marc, I get an error saying "SystemError: error return without exception set". The bottom of the screen reads "General: Document Open Failed:: Failed to open document 'C:\Program Files (x86)\Wing IDE 101 6.0\bin\x-wingide-python-shell:\97113032\2". I am unsure what it all means; I also checked my files and I do not seem to have the specified file location displayed at the bottom of the screen. I do have the py_mentat module imported and thus I do not think it is a module issue.

edit retag flag offensive close merge delete


This exception indicates there's a problem in a C extension module.  Do you get it when you run code outside of Wing?

Wingware Support's avatar Wingware Support  ( 2017-12-04 13:15:00 -0500 )edit

I tried to run the code through Window Command Prompt but it is unable to recognize the file path location of the py_mentat module, even though I tried to copy the module files to the same file location as the .py file. Thus I run into this problem and the code stops before I can look into this system error problem. I was able to fix this on Wing by specifying the file path.

nl3's avatar nl3  ( 2017-12-04 14:07:00 -0500 )edit

Do you need to specify a PYTHONPATH when running via the Windows Command Prompt?  How do you specify the file path within Wing?

Wingware Support's avatar Wingware Support  ( 2017-12-04 15:04:00 -0500 )edit

I specified the file path within Wing by Edit > Configure Python... and specifying the absolute path location of py_mentat.pyd through "Python Path". I have been looking into setting the PYTHONPATH in environment variables but to no success.

nl3's avatar nl3  ( 2017-12-04 15:27:00 -0500 )edit

Try set PYTHONPATH=c:\full\path\name in the Windows Command Prompt window before you run python. 

Wingware Support's avatar Wingware Support  ( 2017-12-04 15:35:00 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-12-04 15:50:00 -0500

This exception occurs when there is a bug in a C extension module.  Since this exception occurs outside of Wing, it is probably not related to Wing.  I recommend that you contact the author of the C extension module with a reproducible test case that does not involve Wing and ask them to fix it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-12-04 13:09:00 -0500

Seen: 2,164 times

Last updated: Mar 07 '19