3

How to check the error status after api call

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.

halimgur's avatar
201
halimgur
asked 2022-01-26 18:51:54 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2022-02-18 17:07:43 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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)
Julien Marrec's avatar
29.7k
Julien Marrec
answered 2022-09-06 03:44:00 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments