Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Error reading IDF files

asked 2022-01-30 17:00:02 -0500

prp92's avatar

updated 2022-02-18 17:09:00 -0500


I tried to read my idf file using Python. But it is throwing a error:

TypeError: '<=' not supported between instances of 'str' and 'float'

The image below shows the details. image description

I searched all over internet but could not find the solution.

any help will be highly appreciated..


edit retag flag offensive close merge delete


I am assuming that "<=" cannot be applied to a string (text). Need to verify / convert the string values to float/integer (number)?

KerryHarp's avatar KerryHarp  ( 2022-01-31 07:46:14 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2022-01-31 09:31:33 -0500

I would confirm that you're using the same EnergyPlus version between the IDF you're loading and the PyIDF you're reading the IDF with. I'm guessing that you're using PyIDF for EnergyPlus v9.2 or earlier, but loading an IDF for EnergyPlus v9.3 or later. Here is an example object for v9.6:

  PolygonClipping,         !- Shading Calculation Method
  Periodic,                !- Shading Calculation Update Frequency Method
  20,                      !- Shading Calculation Update Frequency
  15000,                   !- Maximum Figures in Shadow Overlap Calculations
  SutherlandHodgman,       !- Polygon Clipping Algorithm
  512,                     !- Pixel Counting Resolution
  SimpleSkyDiffuseModeling,!- Sky Diffuse Modeling Algorithm
  No,                      !- Output External Shading Calculation Results
  No,                      !- Disable Self-Shading Within Shading Zone Groups
  No;                      !- Disable Self-Shading From Shading Zone Groups to Other Zones

The first error line is saying that "PolygonClipping" is not a valid input for the calculation method, but the example object above has this set as the Shading calculation method (first input field) -- so slightly different input field names. Looking at the Input Output Reference for this object between versions, this input field name change happened in v9.3 -- v9.2 had a different set of options for this input field.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops


Question Tools



Asked: 2022-01-30 17:00:02 -0500

Seen: 468 times

Last updated: Jan 31 '22