I try to use a python.exe version (2.6.2) that ships with the software-package ABAQUS on Windows 7, 64 bit. When launching it from the windows command prompt it works. When launching it from eclipse with pydev python.exe crahes and I get the following type of messages in the event-viewer. PATH and PYTHONPATH are the same in both cases. Where should I look for differences?
Name der fehlerhaften Anwendung: python.exe, Version: 0.0.0.0, Zeitstempel: 0x4bbe637a
Name des fehlerhaften Moduls: KERNELBASE.dll, Version: 6.1.7601.17514, Zeitstempel: 0x4ce7c78c
Ausnahmecode: 0xc0000025
Fehleroffset: 0x000000000000a49d
ID des fehlerhaften Prozesses: 0x43c
Startzeit der fehlerhaften Anwendung: 0x01cc1cb01a128583
Pfad der fehlerhaften Anwendung: C:\SIMULIA\Abaqus\6.10-1\Python\Obj\python.exe
Pfad des fehlerhaften Moduls: C:\Windows\system32\KERNELBASE.dll
Berichtskennung: 57d21b66-88a3-11e0-9202-f0def11d25ce
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One additional information: I can run the python interpreter in eclipse using the "PyDev Console". Its output is
import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))
C:\SIMULIA\Abaqus\6.10-1\Python\Obj\python.exe 2.6.2 (r262:71600, Apr 7 2010, 16:24:50)
Via execfile() I can successfully run my scripts. But I still have no solution for running/debugging via "Debug Configurations…" because of the above mentioned crashes. Any suggestions please?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does it crash always? I.e.: if you create an empty script at the root of your source project with a single print, does it also crash? (the part related to being at the source is important, as if the file is somewhere else, you may already import lots of things)
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, even the single-print script crashes. Nothing stands in the eclipse\.metadata\.log. This is the output from "See resulting command line"
C:\SIMULIA\Abaqus\6.10-1\Python\Obj\python.exe -u -v
\\nas1\W01\hart\eclipse\workspace\PostProcessor\src\simple.py
Have you tried starting eclipse from the same shell you're using when you run python?
Also, if you set in the shell the same PYTHONPATH
i.e.:
set PYTHONPATH=C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481\plugins\org.python.pydev_2.1.0.2011052613\PySrc\pydev_sitecustomize;\\nas1\W01\hart\eclipse\workspace\PostProcessor\src;C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481\plugins\org.python.pydev_2.1.0.2011052613\PySrc;C:\SIMULIA\Abaqus\6.10-1\Python\Lib
I did the following steps:
1. Open a shell
2. set path=c:\windows;c:\windows\system32;C:\SIMULIA\Abaqus\6.10-1\exec\lbr\;C:\SIMULIA\Abaqus\6.10-1\External
(The abaqus-python interpreter requires dlls that are in the abaqus folders)
3. set PYTHONPATH=C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481\plugins\org.python.pydev_2.1.0.2011052613\PySrc\pydev_sitecustomize;\\nas1\W01\hart\eclipse\workspace\PostProcessor\src;C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481plugins\org.python.pydev_2.1.0.2011052613\PySrc;C:\SIMULIA\Abaqus\6.10-1\Python\Lib
4. Execute the script via the command line: C:\SIMULIA\Abaqus\6.10-1\Python\Obj\python.exe -u -v \\nas1\W01\hart\eclipse\workspace\PostProcessor\src\simple.py
-> works
5. Launch eclipse (-arch x86_64) from the same shell: "C:\Program Files\eclipse\eclipse.exe"
6. Open a pydev console and choose the abaqus interpreter and run the script via execfile("\\\\nas1\W01\hart\eclipse\workspace\PostProcessor\src\simple.py") -> works
7. Run the same script via "Launch Configurations…" -> crahses as shown in post 1
Best regards,
webhart
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Edit the file C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481\plugins\org.python.pydev_2.1.0.2011052613\PySrc\pydev_sitecustomize\sitecustomize.py
and add a
print "sitecustomize"
as the first line in that script and then run it from PyDev (as that's the first file executed by Python, I'm trying to discover if it crashes before or after entering in that file).
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hey guys,
after some searching I found the solution: Eclipse or PyDev adds some environment variables. Apparently Abaqus crashes if 'PYTHONIOENCODING' is set. So I just removed this variable within python and it worked.
importostry:os.environ.pop('PYTHONIOENCODING')exceptKeyError:pass# now call abaquscode]
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I try to use a python.exe version (2.6.2) that ships with the software-package ABAQUS on Windows 7, 64 bit. When launching it from the windows command prompt it works. When launching it from eclipse with pydev python.exe crahes and I get the following type of messages in the event-viewer. PATH and PYTHONPATH are the same in both cases. Where should I look for differences?
Name der fehlerhaften Anwendung: python.exe, Version: 0.0.0.0, Zeitstempel: 0x4bbe637a
Name des fehlerhaften Moduls: KERNELBASE.dll, Version: 6.1.7601.17514, Zeitstempel: 0x4ce7c78c
Ausnahmecode: 0xc0000025
Fehleroffset: 0x000000000000a49d
ID des fehlerhaften Prozesses: 0x43c
Startzeit der fehlerhaften Anwendung: 0x01cc1cb01a128583
Pfad der fehlerhaften Anwendung: C:\SIMULIA\Abaqus\6.10-1\Python\Obj\python.exe
Pfad des fehlerhaften Moduls: C:\Windows\system32\KERNELBASE.dll
Berichtskennung: 57d21b66-88a3-11e0-9202-f0def11d25ce
One additional information: I can run the python interpreter in eclipse using the "PyDev Console". Its output is
import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))
C:\SIMULIA\Abaqus\6.10-1\Python\Obj\python.exe 2.6.2 (r262:71600, Apr 7 2010, 16:24:50)
Via execfile() I can successfully run my scripts. But I still have no solution for running/debugging via "Debug Configurations…" because of the above mentioned crashes. Any suggestions please?
Does it crash always? I.e.: if you create an empty script at the root of your source project with a single print, does it also crash? (the part related to being at the source is important, as if the file is somewhere else, you may already import lots of things)
Cheers,
Fabio
Yes, even the single-print script crashes. Nothing stands in the eclipse\.metadata\.log. This is the output from "See resulting command line"
C:\SIMULIA\Abaqus\6.10-1\Python\Obj\python.exe -u -v
\\nas1\W01\hart\eclipse\workspace\PostProcessor\src\simple.py
The PYTHONPATH that will be used is:
C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481\plugins\org.python.pydev_2.1.0.2011052613\PySrc\pydev_sitecustomize;\\nas1\W01\hart\eclipse\workspace\PostProcessor\src;C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481\plugins\org.python.pydev_2.1.0.2011052613\PySrc;C:\SIMULIA\Abaqus\6.10-1\Python\Lib
Regards,
webhart
Have you tried starting eclipse from the same shell you're using when you run python?
Also, if you set in the shell the same PYTHONPATH
i.e.:
set PYTHONPATH=C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481\plugins\org.python.pydev_2.1.0.2011052613\PySrc\pydev_sitecustomize;\\nas1\W01\hart\eclipse\workspace\PostProcessor\src;C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481\plugins\org.python.pydev_2.1.0.2011052613\PySrc;C:\SIMULIA\Abaqus\6.10-1\Python\Lib
and execute that command line
C:\SIMULIA\Abaqus\6.10-1\Python\Obj\python.exe -u -v \\nas1\W01\hart\eclipse\workspace\PostProcessor\src\simple.py
does it work?
Cheers,
Fabio
Fabio, thank you for the suggestions.
I did the following steps:
1. Open a shell
2. set path=c:\windows;c:\windows\system32;C:\SIMULIA\Abaqus\6.10-1\exec\lbr\;C:\SIMULIA\Abaqus\6.10-1\External
(The abaqus-python interpreter requires dlls that are in the abaqus folders)
3. set PYTHONPATH=C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481\plugins\org.python.pydev_2.1.0.2011052613\PySrc\pydev_sitecustomize;\\nas1\W01\hart\eclipse\workspace\PostProcessor\src;C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481plugins\org.python.pydev_2.1.0.2011052613\PySrc;C:\SIMULIA\Abaqus\6.10-1\Python\Lib
4. Execute the script via the command line: C:\SIMULIA\Abaqus\6.10-1\Python\Obj\python.exe -u -v \\nas1\W01\hart\eclipse\workspace\PostProcessor\src\simple.py
-> works
5. Launch eclipse (-arch x86_64) from the same shell: "C:\Program Files\eclipse\eclipse.exe"
6. Open a pydev console and choose the abaqus interpreter and run the script via execfile("\\\\nas1\W01\hart\eclipse\workspace\PostProcessor\src\simple.py") -> works
7. Run the same script via "Launch Configurations…" -> crahses as shown in post 1
Best regards,
webhart
Can you do one more test:
Edit the file C:\Users\hart\.eclipse\org.eclipse.platform_3.6.1_1709980481\plugins\org.python.pydev_2.1.0.2011052613\PySrc\pydev_sitecustomize\sitecustomize.py
and add a
print "sitecustomize"
as the first line in that script and then run it from PyDev (as that's the first file executed by Python, I'm trying to discover if it crashes before or after entering in that file).
Cheers,
Fabio
hey guys,
after some searching I found the solution: Eclipse or PyDev adds some environment variables. Apparently Abaqus crashes if 'PYTHONIOENCODING' is set. So I just removed this variable within python and it worked.