python - Subprocess crashes unexpectedly from PyDev, works fine from double click in windows explorer -


i've spent quite bit of time trying figure out. i'm trying invoke line run abaqus (an fea program):

popen = subprocess.popen(callcommand, cwd=workdir, creationflags=subprocess.create_new_console) popen.wait() 

when double clicking on .py file everthing works fine. on running eclipse, abaqus crashes:

this application has requested runtime terminate in unusual way. please contact application's support team more information. 

then later "smapython.exe has stopped working".

i've played around admin privilege settings no avail. don't have rep tag abaqus.

the solution (which i've come accross after writting draft question) found here:

http://sourceforge.net/p/pydev/discussion/293649/thread/94a76ecb/

basically, pydev adds environment variables don't play abaqus, turn them off following code can used:

import os try:     os.environ.pop('pythonioencoding') except keyerror:     pass # call abaqus... 

hopefully of use someone, i've spent 2 days fixing this. bit of niche use of pydev (i'm not programmer, i'm civil engineer) think more powerful have eclipse take care of source files. abaqus cae files binary , proprietary source control , custom edits pain otherwise.

i guess in case solution trace problem taking bits of off , checking works , differences are.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -