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 2022-01-26 18:51:54 -0500

halimgur's avatar

updated 2022-02-18 17:07:43 -0500

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-06 03:44:00 -0500

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)
edit flag offensive delete link more

Your Answer

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

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2022-01-26 18:51:54 -0500

Seen: 950 times

Last updated: Sep 06 '22