Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

python scripting

Status
Not open for further replies.

alan14

Mechanical
Feb 26, 2006
13
0
0
DE
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.
 
Replies continue below

Recommended for you

hallo alan,
i'm not sure whether you can import the abaqus module without the session object. this could be the reason for the message.

cheers
 
i tried abaqus script=shelf

but this requires a *.psf file. while i have a python shelf.py file. how can i solve this?

thx
 
I changed the extension to *.psf still getting errors.

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.
 
Status
Not open for further replies.
Back
Top