First time here? Check our help page!
2

Error reading IDF files

Hello..

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..

thanks

prp92's avatar
125
prp92
asked 2022-01-30 17:00:02 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2022-02-18 17:09:00 -0500
edit flag offensive 0 remove flag close merge delete

Comments

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
add a comment see more comments

1 Answer

1

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:

ShadowCalculation,
  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.

Aaron Boranian's avatar
14.1k
Aaron Boranian
answered 2022-01-31 09:31:33 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments