EPPY error in running simulation using IDF.Run
Hi,
I'm running into some errors in trying to run an EnergyPlus simulation through EPPY. I am working on a Windows OS. To give a simple example of the error I am trying to run the '1ZoneUncontrolled.idf' with EnergyPlus 8.5 from the E+ examples with an EPW for Amsterdam (renamed 'someWeather.epw' here).
When I run the following python code (all these files are containted within the current 'C:\Z_TestEPPY' directory):
# Import libraries
import eppy
import sys
import os
from eppy.modeleditor import IDF
iddfile = "Energy+V8_5_0.idd"
IDF.setiddname(iddfile)
idfname = '1ZoneUncontrolled.idf'
epwfile = 'someWeather.epw'
Idf = IDF(idfname, epwfile)
Idf.run()
I get the following errors:
ERROR: Could not find input data dictionary: C:\Users\20171493\AppData\Local\Temp\tmp79zt77cw\Energy+V8_5_0.idd.
Type 'energyplus --help' for usage.
Traceback (most recent call last):
File "C:\Python39\lib\site-packages\eppy\runner\run_functions.py", line 356, in run
check_call(cmd)
File "C:\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:/EnergyPlusV8-5-0\\energyplus.exe', '--weather', 'C:\\Z_TestEPPY\\someWeather.epw', '--output-directory', 'C:\\Z_TestEPPY', '--idd', 'Energy+V8_5_0.idd', 'C:\\Z_TestEPPY\\in.idf']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python39\lib\site-packages\eppy\modeleditor.py", line 1010, in run
run(self, weather=epw, idd=idd, **kwargs)
File "C:\Python39\lib\site-packages\eppy\runner\run_functions.py", line 361, in run
raise EnergyPlusRunError(message)
eppy.runner.run_functions.EnergyPlusRunError:
Contents of EnergyPlus error file at C:\Z_TestEPPY\eplusout.err
<File not found>
I run into this error regardless of the directory, idf or EnergyPlus version that I use. I noted that in the line 'C:/EnergyPlusV8-5-0\e' in the error message there is an inconsistency in the path directory seperators where C:/ does not have an escape character before it. Also the in.idf file does not get created.
Here you can find a link to all the files that I am using in this example.
Kind regards,
Samuel
Have you tried using full paths for iddfile, idfname, and epwfile?
Yes; that worked! The problem also appeared to be caused by the IDF name starting with a number.
When I used the full path " idfname = 'C:\Z_TestEPPY\1ZoneUncontrolled.idf' " was turned into " idfname = 'C:\Z_TestEPPY\e1ZoneUncontrolled.idf' ". When I changed it to " idfname = 'C:\Z_TestEPPY\someInput.idf' " it worked.
Thanks for the quick response!