Error log and breaking the analysis

Forum for asking and answering questions related to use of the OpenSeesPy module

Moderators: silvia, selimgunay, Moderators

Post Reply
vacalderon
Posts: 6
Joined: Mon Aug 28, 2017 2:09 pm
Location: North Carolina State University

Error log and breaking the analysis

Post by vacalderon » Mon Nov 08, 2021 10:49 am

Hello All,

I have been running a series of analysis using OpenSeesPy. Basically I transformed my model into a function so I can change the geometry and materials as I wish. I use this function inside a loop that iterates through geometrical variables and ground motion records. Every now and then I find an error and I would like to know if there is a way to for opensees to give me the type of error and print it out or store it as a string, and also which analysis had the error, to debug the code a bit more.

Something like:

If anyerror:
print(errortype)
print(analysisfilename)
print(groundmotionfilename)
break

I know the error prints to the console but I would like to obtain it from OpenSees and store any message within the code to build a database as opposed to having a big log print out.

Post Reply