eppy: Running idf.run() causes a CalledProcessError and EnergyPlusRunError
Hi @santoshphilip and @jamiebull1 ,
Hope you are well. I’d just like to report an issue I am having with idf.run() causing an E+ CalledProcessError and EnergyPlusRunError. I am using eppy v0.5.52, python 3.7.6 and EnergyPlus v8.5.0.
My test code is as follows:
import sys
pathnameto_eppy = 'C:/ProgramData/Anaconda3/envs/tf/lib/site-packages/eppy'
sys.path.append(pathnameto_eppy)
#import eppy
from eppy import modeleditor
from eppy.modeleditor import IDF
try:
IDF.setiddname('Energy+.idd')
except modeleditor.IDDAlreadySetError as e:
pass
idfname = r"pyEp/Ref/1ZoneEvapCooler.idf"
epwname = 'C:/EnergyPlusV8-5-0\WeatherData/ITA_Rome.162420_IWEC.epw'
idf = IDF(idfname, epw = epwname)
idf.run(expandobjects = True, verbose="v", output_directory = r"pyEp/Ref/", readvars = True, output_suffix = 'C')
Running this code gives the following error message:
C:/EnergyPlusV8-5-0\energyplus.exe --weather C:\EnergyPlusV8-5-0\WeatherData\ITA_Rome.162420_IWEC.epw --output-directory C:\Users\AnjukanK\Documents\Anjukan\Anaconda Projects\PyEp_gym\pyEp\Ref --idd Energy+.idd --expandobjects --readvars --output-suffix C C:\Users\AnjukanK\Documents\Anjukan\Anaconda Projects\PyEp_gym\in.idf
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\tf\lib\site-packages\eppy\runner\run_functions.py", line 357, in run
check_call(cmd)
File "C:\ProgramData\Anaconda3\envs\tf\lib\subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['C:/EnergyPlusV8-5-0\\energyplus.exe', '--weather', 'C:\\EnergyPlusV8-5-0\\WeatherData\\ITA_Rome.162420_IWEC.epw', '--output-directory', 'C:\\Users\\AnjukanK\\Documents\\Anjukan\\Anaconda Projects\\PyEp_gym\\pyEp\\Ref', '--idd', 'Energy+.idd', '--expandobjects', '--readvars', '--output-suffix', 'C', 'C:\\Users\\AnjukanK\\Documents\\Anjukan\\Anaconda Projects\\PyEp_gym\\in.idf']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\AnjukanK\Documents\Anjukan\Anaconda Projects\PyEp_gym\eppy_test.py", line 31, in <module>
idf.run(expandobjects = True, verbose="v", output_directory = r"pyEp/Ref/", readvars = True, output_suffix = 'C')
File "C:\ProgramData\Anaconda3\envs\tf\lib\site-packages\eppy\modeleditor.py", line 1014, in run
run(self, weather=epw, idd=idd, **kwargs)
File "C:\ProgramData\Anaconda3\envs\tf\lib\site-packages\eppy\runner\run_functions.py", line 362, in run
raise EnergyPlusRunError(message)
EnergyPlusRunError:
Contents of EnergyPlus error file at C:\Users\AnjukanK\Documents\Anjukan\Anaconda Projects\PyEp_gym\pyEp\Ref\eplusout.err
<File not found>
The idf runs fine when using both EP Launch and the command line. I have checked that all files are in their stated locations. I have tried different IDF files with the same error. I have gotten idf.run() to work in another python installation with eppy v0.5.46 and python 3.4.3 so not sure if that is the issue? Any idea what I could be doing wrong?
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 21 (15 by maintainers)
ack your message. Your code looks good at first glance.
I’ll test later today and see what comes up