Skip to content

fixed missing dependencies and added abosulte path to SIA.py#92

Open
LckyLke wants to merge 2 commits intoRWTH-EBC:developfrom
LckyLke:develop
Open

fixed missing dependencies and added abosulte path to SIA.py#92
LckyLke wants to merge 2 commits intoRWTH-EBC:developfrom
LckyLke:develop

Conversation

@LckyLke
Copy link
Copy Markdown

@LckyLke LckyLke commented Dec 10, 2025

Thanks for the great work :)

I added some depencies that were missing and added the path as an absoulte path to SIA.py
Otherwise the datahandler breaks when not run from the correct dir.

Ie:

Traceback (most recent call last):
  File "/home/lukef/Dokumente/GitHub/districtgenerator/temp.py", line 86, in _generate_with_districtgenerator
    data.generateBuildings()
  File "/home/lukef/Dokumente/GitHub/districtgenerator/districtgenerator/classes/datahandler.py", line 630, in generateBuildings
    building["user"] = Users(building=building["buildingFeatures"]["building"],
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lukef/Dokumente/GitHub/districtgenerator/districtgenerator/classes/users.py", line 119, in __init__
    self.SIA2024 = SIA.read_SIA_data()
                   ^^^^^^^^^^^^^^^^^^^
  File "/home/lukef/Dokumente/GitHub/districtgenerator/districtgenerator/functions/SIA.py", line 8, in read_SIA_data
    data = pd.read_excel('../districtgenerator/data/SIA2024.xlsx', sheet_name='SIA2024', header=1)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/lukef/miniconda3/envs/temp_dist/lib/python3.11/site-packages/pandas/io/excel/_base.py", line 495, in read_excel
    io = ExcelFile(
         ^^^^^^^^^^
  File "/home/lukef/miniconda3/envs/temp_dist/lib/python3.11/site-packages/pandas/io/excel/_base.py", line 1550, in __init__
    ext = inspect_excel_format(
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/lukef/miniconda3/envs/temp_dist/lib/python3.11/site-packages/pandas/io/excel/_base.py", line 1402, in inspect_excel_format
    with get_handle(
         ^^^^^^^^^^^
  File "/home/lukef/miniconda3/envs/temp_dist/lib/python3.11/site-packages/pandas/io/common.py", line 882, in get_handle
    handle = open(handle, ioargs.mode)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '../districtgenerator/data/SIA2024.xlsx'

Otherwise the datahandler breaks when not run from the correct dir.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant