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

Improve reporting when model subprocess fails #306

Open
tomalrussell opened this issue Feb 19, 2019 · 0 comments
Open

Improve reporting when model subprocess fails #306

tomalrussell opened this issue Feb 19, 2019 · 0 comments

Comments

@tomalrussell
Copy link
Member

Example run:

$ smif run energy_supply_minimal
smif\data_layer\file\file_metadata_store.py:135: FionaDeprecationWarning: Use fiona.Env() instead.
  with fiona.drivers():
pandas\core\frame.py:3697: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  errors=errors)
Traceback (most recent call last):
  File "smif\controller\scheduler.py", line 178, in add
    self._run(job_graph, job_graph_id)
  File "smif\controller\scheduler.py", line 249, in _run
    model.simulate(data_handle)
  File "models\energy_supply\energy_supply.py", line 31, in simulate
    self.run_the_model()
  File "models\energy_supply\energy_supply.py", line 209, in run_the_model
    self.logger.debug(check_output([model_path]))
  File "lib\subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "lib\subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['models\\energy_supply\\..\\..\\install\\energy_supply\\Energy_Supply_Master.exe']' returned non-zero exit status 3221225595.
CalledProcessError: Command '['models\\energy_supply\\..\\..\\install\\energy_supply\\Energy_Supply_Master.exe']' returned non-zero exit status 3221225595.
  • should be clearer that this is a model-running failure
  • could avoid or suppress warnings (these add noise, make things less clear)
  • could add a message to suggest running with -vv for debugging output
  • could do more to capture/report stderr/out from subprocess if possible and helpful
@willu47 willu47 added this to the Usability milestone Apr 26, 2019
@tomalrussell tomalrussell removed this from the Usability milestone Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants