SystemError: error return without exception set
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.
Comments
This exception indicates there's a problem in a C extension module. Do you get it when you run code outside of Wing?
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.
Do you need to specify a PYTHONPATH when running via the Windows Command Prompt? How do you specify the file path within Wing?
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.
Try set PYTHONPATH=c:\full\path\name in the Windows Command Prompt window before you run python.