IWUGERMANY/DIBS---Dynamic-ISO-Building-Simulator

annualSimulation.py - IndexError: single positional indexer is out-of-bounds

claimHF opened this issue · 3 comments

Anaconda env
pandas 2.0.3

Beim starten von annualSimulation.py nach Anleitung bekomme ich ein "IndexError: single positional indexer is out-of-bounds"

Volle Meldung:
`Traceback (most recent call last):

File ~\Anaconda3\envs\DIBS\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File c:\users\hartmut\dibs---dynamic-iso-building-simulator\iso_simulator\annualsimulation\annualsimulation.py:635
f_GHG = f_GHG.iloc[0] # Selects first row (0) value

File ~\Anaconda3\envs\DIBS\lib\site-packages\pandas\core\indexing.py:1103 in getitem
return self._getitem_axis(maybe_callable, axis=axis)

File ~\Anaconda3\envs\DIBS\lib\site-packages\pandas\core\indexing.py:1656 in _getitem_axis
self._validate_integer(key, axis)

File ~\Anaconda3\envs\DIBS\lib\site-packages\pandas\core\indexing.py:1589 in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")

IndexError: single positional indexer is out-of-bounds`

Soweit ich das nachvollziehen kann:
Zeile 635
f_GHG = f_GHG.iloc[0]
scheint bei Fueltype = 'None' den error zu erzeugen

Zeile 627
setzt man Fueltype = 'NoCooling' läuft es

Edit: Zeilen ergänzt

Ich hatte auch das gleiche Problem und hatte ähnlich gelöst.

Du sollst erst die richtigien Versionen von Pandas und Numpy und Python installieren
Pandas 1.5.3
Numpy 1.22.4
Python 3.10.4

Wie von Wail angesprochen benötigt der DIBS v.1.1.0 noch die oben genannten Version um problemlos zu arbeiten. Wir arbeiten gerade an einer Version, die von Numpy und Pandas unabhängig wird und mit den aktuellen Versionen funktioniert.