Errors while following documentation
Closed this issue · 2 comments
I've attempted to read and run an EnergyPlus file following the instructions given in the documentation. Very few steps worked, although many issues seem to be a fault of dependencies. Below I describe what hasn't worked. archetypal version: v1.3.0-dev (56f95d0), E+ version: 9.2.0, installation method: installing using conda, as per installation instructions.
Reading
Loading only an IDF file works fine, but loading an IDF and weather file at once fails with the following error trace:
click me
ValueError Traceback (most recent call last)
<ipython-input-8-493961940195> in <module>
----> 1 idf2 = load_idf(eplus_file, weather)
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/archetypal/idfclass.py in load_idf(eplus_file, idd_filename, output_folder, include, weather_file, ep_version)
774 include=include,
775 epw=weather_file,
--> 776 ep_version=ep_version if ep_version is not None else settings.ep_version,
777 )
778 log("Eppy load completed in {:,.2f} seconds\n".format(time.time() - start_time))
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/archetypal/idfclass.py in _eppy_load(file, idd_filename, output_folder, include, epw, ep_version)
825 IDF.setiddname(idd_filename, testing=True)
826 # load the idf object
--> 827 idf_object = IDF(file, epw=epw)
828 # Check version of IDF file against version of IDD file
829 idf_version = idf_object.idfobjects["VERSION"][0].Version_Identifier
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/archetypal/idfclass.py in __init__(self, *args, **kwargs)
57 **kwargs:
58 """
---> 59 super(IDF, self).__init__(*args, **kwargs)
60 self._sql_file = None
61 self.schedules_dict = self.get_all_schedules()
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/eppy/modeleditor.py in __init__(self, idfname, epw)
548 if idfname != None:
549 self.idfname = idfname
--> 550 self.read()
551 if epw != None:
552 self.epw = epw
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/geomeppy/patches.py in read(self)
254 raise IDDNotSetError(errortxt)
255 self.idfobjects, block, self.model, idd_info, idd_index, versiontuple = idfreader1(
--> 256 self.idfname, self.iddname, self, commdct=self.idd_info, block=self.block
257 )
258 self.__class__.setidd(idd_info, idd_index, block, versiontuple)
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/geomeppy/patches.py in idfreader1(fname, iddfile, theidf, conv, commdct, block)
88
89 """
---> 90 versiontuple = iddversiontuple(iddfile)
91 block, data, commdct, idd_index = readdatacommdct1(
92 fname, iddfile=iddfile, commdct=commdct, block=block
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/eppy/idfreader.py in iddversiontuple(afile)
49 return (0,)
50 vers = line.split()[-1]
---> 51 return versiontuple(vers)
52
53
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/eppy/idfreader.py in versiontuple(vers)
34 def versiontuple(vers):
35 """version tuple"""
---> 36 return tuple([int(num) for num in vers.split(".")])
37
38 try:
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/eppy/idfreader.py in <listcomp>(.0)
34 def versiontuple(vers):
35 """version tuple"""
---> 36 return tuple([int(num) for num in vers.split(".")])
37
38 try:
ValueError: invalid literal for int() with base 10: 'Ap,IL,USA,TMY3,725300,41'
Running
Once an IDF is loaded (using the successful method idf = load_idf(eplus_file)
), the run command (idf.run_eplus(weather_file)
) causes an exception: TypeError: run_eplus() takes 1 positional argument but 2 were given
.
If I run the file without first loading it (archetypal.idfclass.run_eplus(eplus_file, weather)
) I get an EnergyPlus error:
click me
EnergyPlusProcessError Traceback (most recent call last)
<ipython-input-27-9a3f51f38d18> in <module>
----> 1 run_eplus(eplus_file, weather)
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/archetypal/idfclass.py in run_eplus(eplus_file, weather_file, output_directory, ep_version, output_report, prep_outputs, simulname, keep_data, annual, design_day, epmacro, expandobjects, readvars, output_prefix, output_suffix, version, verbose, keep_data_err, include, process_files, custom_processes, return_idf, return_files)
1751 }
1752
-> 1753 _run_exec(**runargs)
1754
1755 log(
~/miniconda3/envs/archetypal/lib/python3.7/site-packages/archetypal/idfclass.py in _run_exec(tmp, eplus_file, weather, output_directory, annual, design_day, idd, epmacro, expandobjects, readvars, output_prefix, output_suffix, version, verbose, ep_version, keep_data_err, output_report, include)
1977 tmp.copytree(failed_dir / output_prefix)
1978 raise EnergyPlusProcessError(
-> 1979 cmd=cmd, idf=eplus_file.basename(), stderr=stderr_r
1980 )
1981
EnergyPlusProcessError: AdultEducationCenter.idf:
Program Version,EnergyPlus, Version 9.2.0-921312fa1d, YMD=2020.03.02 14:23,
** Severe ** Line: 1056 You must run the ExpandObjects program for "HVACTemplate:Thermostat"
** Severe ** Line: 1065 You must run the ExpandObjects program for "HVACTemplate:Zone:IdealLoadsAirSystem"
** Fatal ** Errors occurred on processing input file. Preceding condition(s) cause termination.
...Summary of Errors that led to program termination:
..... Reference severe error count=2
..... Last severe error=Line: 1065 You must run the ExpandObjects program for "HVACTemplate:Zone:IdealLoadsAirSystem"
************* 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; 2 Severe Errors; Elapsed Time=00hr 00min 0.21sec
Note: this issue comes to you as part of my wider JOSS review
Hi @brynpickering; my bad! Reading an idf file in needs the weather_file
keyword. Passing it as an argument won't work since the second argument is the idd_filename
. I've fixed the documentation with 6fb4197
idf2 = load_idf(eplus_file, weather_file=weather)
Same for the run_eplus
method. weather_file must be passed as a keyword argument, not a positional argument.
I've made changes to the docs the reflect this issue. Let me know if the latest develop version works for you.
Yep, that all runs smoothly now. Thanks!