First time here? Check out the Help page!

Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
3

How to check the error status after api call

asked 3 years ago

halimgur's avatar

updated 3 years ago

Is it possible to check the error status after an

api.runtime.run_energyplus

call without reading the eplusout.err file?

It would be handy for the python script to know that there is an error.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 2 years ago

Use the callback_error()in the Functional API: https://nrel.github.io/EnergyPlus/api...

Try this:

def error_handler(severity: int, message: bytes) -> None:
    print(f"{severity=}: {message}")

api.functional.callback_error(state, error_handler)
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 3 years ago

Seen: 977 times

Last updated: Sep 06 '22