Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pyenergyplus] system exit called when energyplus can't run #8483

Closed
1 of 3 tasks
antoine-galataud opened this issue Jan 26, 2021 · 1 comment · Fixed by #8574
Closed
1 of 3 tasks

[pyenergyplus] system exit called when energyplus can't run #8483

antoine-galataud opened this issue Jan 26, 2021 · 1 comment · Fixed by #8574
Assignees
Labels
Defect Includes code to repair a defect in EnergyPlus

Comments

@antoine-galataud
Copy link

antoine-galataud commented Jan 26, 2021

Issue overview

When invalid arguments prevent EnergyPlus binary from running, system exit (1) is called and api caller program is interrupted.

Example:

from pyenergyplus.api import EnergyPlusAPI

if __name__ == "__main__":
    api = EnergyPlusAPI()
    exit_code = api.runtime.run_energyplus(api.state_manager.new_state(), "wrong")
    print("exit:", exit_code)

Output is:

ERROR: Multiple input files specified:
  Input file #1: w
  Input file #2: r
  Input file #3: o
  Input file #4: n
  Input file #5: g
Type 'energyplus --help' for usage.

then script exists with code 1. Last print statement isn't executed.

In library mode, the caller program should be responsible for calling system exit.

Details

  • Platform: Ubuntu 20.04 LTS
  • Version of EnergyPlus: v9.4.0

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Defect file added (list location of defect file here)
  • Ticket added to Pivotal for defect (development team task)
  • Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)
@jmarrec jmarrec added the Defect Includes code to repair a defect in EnergyPlus label Feb 17, 2021
@jmarrec
Copy link
Contributor

jmarrec commented Feb 17, 2021

I find this really annoying too. It kills my jupyter notebook whenever it doesn't work, which defeats the purpose of using a notebook.

@jmarrec jmarrec self-assigned this Feb 18, 2021
@Myoldmopar Myoldmopar self-assigned this Feb 22, 2021
Myoldmopar added a commit that referenced this issue Mar 2, 2021
Fix #8483 - pyenergyplus: system exit called when energyplus can't run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants