×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

script error:TypeError: unsupported operand type(s) for -: 'OdbFrame' and 'int'

script error:TypeError: unsupported operand type(s) for -: 'OdbFrame' and 'int'

script error:TypeError: unsupported operand type(s) for -: 'OdbFrame' and 'int'

(OP)
Hi everybody,

I'm new in abaqus scripting and trying to extract data from odb. I wrote the simple script but it does not work with this error:

TypeError: unsupported operand type(s) for -: 'OdbFrame' and 'int'

Here is my script:


from abaqus import*
from odbAccess import*

Node=113436
nodevector=range(1,Node,1)

R=open('Termal Results','w')

odb=openOdb(path='half-initial1400.odb')
step=odb.steps[Step-12]

cont3=0
for element in nodevector:
region=step.historyRegions['Node half model-initial1400.'+str(B[0][:])]
variable=region.historyOutputs['NT11'].data
for time,data in variable[1 :]:
R.write(data)
R.write('\n')
cont3=cont3+1

R.close()

Do you know what is wrong with it?

RE: script error:TypeError: unsupported operand type(s) for -: 'OdbFrame' and 'int'

> region=step.historyRegions['Node half model-initial1400.'+str(B[0][:])]

Where is B defined?

RE: script error:TypeError: unsupported operand type(s) for -: 'OdbFrame' and 'int'

(OP)
You are right. many thanks

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources