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

"Start Here" tutorial produces EnergyPlusRunError #209

Open
rdmolony opened this issue Jan 7, 2021 · 7 comments
Open

"Start Here" tutorial produces EnergyPlusRunError #209

rdmolony opened this issue Jan 7, 2021 · 7 comments

Comments

@rdmolony
Copy link

rdmolony commented Jan 7, 2021

Hi @jamiebull1, I created a geomeppy docker environment & a Github repo which copies the geomeppy tutorials to enable running the tutorials via docker and unfortunately this bug popped up.

To reproduce:

  1. Clone repo containing a Jupyter Notebook of tutorial and all required files
  2. Run Jupyter Notebook in a geomeppy docker environment
  3. Run the start_here.ipynb tutorial
git clone https://github.com/rdmolony/geomeppy-tutorials
cd geomeppy-tutorials
docker run -it --rm -p 8888:8888 -v $(pwd):/geomeppy-tutorials rdmolony/geomeppy:ep9.1.0-ge0.11.8
jnbook

This docker environment (see github and docker hub) installs geomeppy 0.11.8 and EnergyPlus 9.1.0 as stated in the tutorial

Bug:

idf.run()

/usr/local/bin/energyplus --weather /geomeppy-tutorials/IRL_Dublin.039690_IWEC.epw --output-directory /geomeppy-tutorials --idd /usr/local/bin/Energy+.idd --expandobjects /geomeppy-tutorials/in.idf

---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
/usr/local/lib/python3.7/site-packages/eppy/runner/run_functions.py in run(idf, weather, output_directory, annual, design_day, idd, epmacro, expandobjects, readvars, output_prefix, output_suffix, version, verbose, ep_version)
    355             print("\r\n" + " ".join(cmd) + "\r\n")
--> 356             check_call(cmd)
    357         elif verbose == "q":

/usr/local/lib/python3.7/subprocess.py in check_call(*popenargs, **kwargs)
    362             cmd = popenargs[0]
--> 363         raise CalledProcessError(retcode, cmd)
    364     return 0

CalledProcessError: Command '['/usr/local/bin/energyplus', '--weather', '/geomeppy-tutorials/IRL_Dublin.039690_IWEC.epw', '--output-directory', '/geomeppy-tutorials', '--idd', '/usr/local/bin/Energy+.idd', '--expandobjects', '/geomeppy-tutorials/in.idf']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

EnergyPlusRunError                        Traceback (most recent call last)
<ipython-input-8-031bf0ca3325> in <module>
----> 1 idf.run()

/usr/local/lib/python3.7/site-packages/eppy/modeleditor.py in run(self, **kwargs)
   1008         epw = kwargs.pop("weather", self.epw)
   1009         try:
-> 1010             run(self, weather=epw, idd=idd, **kwargs)
   1011         finally:
   1012             os.remove("in.idf")

/usr/local/lib/python3.7/site-packages/eppy/runner/run_functions.py in run(idf, weather, output_directory, annual, design_day, idd, epmacro, expandobjects, readvars, output_prefix, output_suffix, version, verbose, ep_version)
    359     except CalledProcessError:
    360         message = parse_error(tmp_err, output_dir)
--> 361         raise EnergyPlusRunError(message)
    362     finally:
    363         sys.stderr = sys.__stderr__

EnergyPlusRunError: 

Contents of EnergyPlus error file at /geomeppy-tutorials/eplusout.err
Program Version,EnergyPlus, Version 9.1.0-08d2e308bb, YMD=2021.01.07 10:45,
   **  Fatal  ** Input file path /geomeppy-tutorials/eplusout.expidf not found
   ...Summary of Errors that led to program termination:
   ..... Reference severe error count=0
   ..... Last severe error=
   ************* Warning:  Node connection errors not checked - most system input has not been read (see previous warning).
   ************* Fatal error -- final processing.  Program exited before simulations began.  See previous error messages.
   ************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.
   ************* EnergyPlus Sizing Error Summary. During Sizing: 0 Warning; 0 Severe Errors.
   ************* EnergyPlus Terminated--Fatal Error Detected. 0 Warning; 0 Severe Errors; Elapsed Time=00hr 00min  0.11sec

Thanks for creating/maintaining geomeppy and eppy - really really useful repos! I'm very eager to get this docker environment working so I can leverage geomeppy for IDF file manipulation

@rdmolony rdmolony changed the title Start Here tutorial produces EnergyPlusRunError "Start Here" tutorial produces EnergyPlusRunError Jan 7, 2021
@rdmolony
Copy link
Author

rdmolony commented Jan 7, 2021

To make sure that this isn't an issue with the EnergyPlus docker image or eppy (v0.5.53) I copied the eppy runenergyplus tutorial into a Jupyter Notebook in a Github repo called eppy-tutorials and created an eppy docker image to run it in. This tutorial seems to run without problems

@rdmolony
Copy link
Author

rdmolony commented Jan 7, 2021

@santoshphilip solution in this eppy issue does the trick:

import os
def make_eplaunch_options(idf):
    """Make options for run, so that it runs like EPLaunch on Windows"""
    idfversion = idf.idfobjects['VERSION'][0].Version_Identifier.split('.')
    idfversion.extend([0] * (3 - len(idfversion)))
    idfversionstr = '-'.join([str(item) for item in idfversion])
    fname = idf.idfname
    options = {
        # 'ep_version':idfversionstr, # runIDFs needs the version number
            # idf.run does not need the above arg
            # you can leave it there and it will be fine :-)
        'output_prefix':os.path.basename(fname).split('.')[0],
        'output_suffix':'C',
        'readvars':True,
        'expandobjects':True
        }
    return options

theoptions = make_eplaunch_options(idf)
idf.run(**theoptions, output_directory="outputs")

@rdmolony rdmolony closed this as completed Jan 7, 2021
@santoshphilip
Copy link

thanks, @rdmolony , I'll make that update to the eppy documentation.

@santoshphilip
Copy link

@rdmolony , Ignore my previous comment. I commented before I was fully awake.
I should drink my coffee first :-(

@rdmolony
Copy link
Author

rdmolony commented Jan 7, 2021

Thanks for the fix @santoshphilip 😃

@rdmolony rdmolony reopened this Jan 7, 2021
@rdmolony
Copy link
Author

rdmolony commented Jan 7, 2021

I'm sorry to say that the "Start Here" tutorial is still producing an EnergyPlusRunError!

Can reproduce by following the same steps as the initial comment (except this time the notebook contains @santoshphilip fix for eplusout.expidf not found bug)

EnergyPlusRunError: 

Contents of EnergyPlus error file at /geomeppy-tutorials/outputs/eplusout.err
Program Version,EnergyPlus, Version 9.1.0-08d2e308bb, YMD=2021.01.07 13:31,
   ** Severe  ** <root>[FenestrationSurface:Detailed][Block Boring hut Storey 0 Wall 0001 window] - Missing required property 'construction_name'.
   **  Fatal  ** Errors occurred on processing input file. Preceding condition(s) cause termination.
   ...Summary of Errors that led to program termination:
   ..... Reference severe error count=1
   ..... Last severe error=<root>[FenestrationSurface:Detailed][Block Boring hut Storey 0 Wall 0001 window] - Missing required property 'construction_name'.
   ************* Warning:  Node connection errors not checked - most system input has not been read (see previous warning).
   ************* Fatal error -- final processing.  Program exited before simulations began.  See previous error messages.
   ************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.
   ************* EnergyPlus Sizing Error Summary. During Sizing: 0 Warning; 0 Severe Errors.
   ************* EnergyPlus Terminated--Fatal Error Detected. 0 Warning; 1 Severe Errors; Elapsed Time=00hr 00min  0.17sec

I tried commenting out idf.set_wwr(0.6) to check if idf.set_default_constructions() is somehow not setting construction_name for the windows but still get the same bug, weird

@maynouf
Copy link

maynouf commented Apr 20, 2022

@rdmolony I had the same issue that you had when trying to replicate the tutorial.
Apparently the function set_wwr needs a construction parameter in the function, which by default is None.
I replaced idf.set_wwr(0.6) with idf.set_wwr(0.6,construction="Project External Window"), which I believe is the default for windows defined in idf.set_default_constructions(), and now seems to be working correctly.

EDIT: the error I am referring to is not the first one you reported, but the last one (Jan 7, 2021).

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

4 participants