openergy / opyplus

A package to work with EnergyPlus in python
Mozilla Public License 2.0
38 stars 13 forks source link

No IDD found with EnergyPlus 22.2.0 #65

Closed jason-curtis closed 1 year ago

jason-curtis commented 1 year ago

I'm new to EnergyPlus so this might just have been an installation issue; any debugging help would be appreciated.

Describe the bug Error : "ValueError: No idd was found for version (22, 2, 0)." when loading an example model with a freshly installed EnergyPlus 22.2.0

To Reproduce Steps to reproduce the behavior:

  1. install latest EnergyPlus using the .run file from energyplus.net.
  2. Run:
    import os
    import opyplus as op
    from opyplus.compatibility.simulation import EPLUS_AVAILABLE_VERSIONS
    EPLUS_AVAILABLE_VERSIONS # {(22, 2): '/usr/local/EnergyPlus-22-2-0'}
    eplus_dir = op.get_eplus_base_dir_path((22,2,0))
    model_file_path = os.path.join(
    eplus_dir,
    "ExampleFiles",
    "1ZoneEvapCooler.idf"
    )
    op.Epm.load(model_file_path)

Expected behavior model loads

Screenshots Error:

     41 if not os.path.isfile(path):
---> 42     raise ValueError(f"No idd was found for version {version}.")
     43 return path

ValueError: No idd was found for version (22, 2, 0).
jason-curtis commented 1 year ago

Note that I am able to run EnergyPlus directly, which makes me think that my E+ installation is working fine:

$ energyplus -w /usr/local/EnergyPlus-22-2-0/WeatherData/USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw  /usr/local/EnergyPlus-22-2-0/ExampleFiles/1ZoneEvapCooler.idf
EnergyPlus Starting
EnergyPlus, Version 22.2.0-c249759bad, YMD=2022.12.13 09:56
...
EnergyPlus Run Time=00hr 00min  2.57sec
EnergyPlus Completed Successfully.
jason-curtis commented 1 year ago

Also, I confirmed that there's an .idd file present:

/usr/local/EnergyPlus-22-2-0$ head Energy+.idd
!IDD_Version 22.2.0
!IDD_BUILD c249759bad
! ***************************************************************************
! This file is the Input Data Dictionary (IDD) for EnergyPlus.
! The IDD defines the syntax and data model for each type of input "Object."
! Lines in EnergyPlus input files (and IDD) are limited to 500 characters.
!
!
! Note on IDD Processing/Usage
! ----------------------------
ccruveiller commented 1 year ago

Hello @thatneat , thanks for reporting this bug! It looks like you found your way to debug it, I'll look into it to check if it works properly.