python scripting
python scripting
(OP)
hi all,
i am trying to start Abaqus with a python script directly from the command prompt using the command:
abaqus python name.py
where name is the python file name.
I am getting an import error:
C:\Abaqus\Commands>abaqus python shelf.py
Traceback (most recent call last):
File "shelf.py", line 1, in ?
from abaqus import *
File "Python/abaqus.py", line 12, in ?
ImportError: ababltin failed to import
it has to do with the import command(from abaqus import *). when i start abaqus cae and try to run the same script from cae everything works just fine.
please help.
thx in a advance.
i am trying to start Abaqus with a python script directly from the command prompt using the command:
abaqus python name.py
where name is the python file name.
I am getting an import error:
C:\Abaqus\Commands>abaqus python shelf.py
Traceback (most recent call last):
File "shelf.py", line 1, in ?
from abaqus import *
File "Python/abaqus.py", line 12, in ?
ImportError: ababltin failed to import
it has to do with the import command(from abaqus import *). when i start abaqus cae and try to run the same script from cae everything works just fine.
please help.
thx in a advance.





RE: python scripting
i'm not sure whether you can import the abaqus module without the session object. this could be the reason for the message.
cheers
RE: python scripting
Indeed, it's impossible to import ABAQUS/CAE or ABAQUS/VIEWER.
To execute a script : abaqus script=shelf
RE: python scripting
but this requires a *.psf file. while i have a python shelf.py file. how can i solve this?
thx
RE: python scripting
RE: python scripting
C:\sctest>abaqus script=shelf.psf
Traceback (most recent call last):
File "Python/driver/script.py", line 86, in ?
File "Python/driver/application.py", line 119, in run
File "Python/driver/script.py", line 65, in execute
File "gear.psf", line 1, in ?
from abaqus import *
File "Python/abaqus.py", line 12, in ?
ImportError: ababltin failed to import
thanks for your patience.
RE: python scripting
this should work