Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archtypes-mapper IndexError: #3625

Open
AhmedSerageldin opened this issue Jul 9, 2024 · 2 comments
Open

archtypes-mapper IndexError: #3625

AhmedSerageldin opened this issue Jul 9, 2024 · 2 comments
Labels
Milestone

Comments

@AhmedSerageldin
Copy link

AhmedSerageldin commented Jul 9, 2024

I exported zone.shp file from QGIS Then I successfully read in CEA, after that when I run the arctypes-mapper i got the following IndexError :"IndexError: single positional indexer is out-of-bounds".
What could be the reason and how to solve it?
Thanks in advance

- archetypes-mapper:input-databases = ['architecture']
  (default: ['comfort', 'architecture', 'air-conditioning', 'internal-loads', 'supply', 'schedules'])
Traceback (most recent call last):
  File "C:\CityEnergyAnalyst\CityEnergyAnalyst\cea\worker.py", line 146, in worker
    run_job(config, job, server)
  File "C:\CityEnergyAnalyst\CityEnergyAnalyst\cea\worker.py", line 108, in run_job
    script(config=config, **parameters)
  File "C:\CityEnergyAnalyst\CityEnergyAnalyst\cea\api.py", line 60, in __call__
    self._runner.__call__(*args, **kwargs)
  File "C:\CityEnergyAnalyst\CityEnergyAnalyst\cea\api.py", line 38, in script_runner
    script_module.main(config)
  File "C:\CityEnergyAnalyst\CityEnergyAnalyst\cea\datamanagement\archetypes_mapper.py", line 409, in main
    archetypes_mapper(locator=locator,
  File "C:\CityEnergyAnalyst\CityEnergyAnalyst\cea\datamanagement\archetypes_mapper.py", line 84, in archetypes_mapper
    architecture_mapper(locator, building_typology_df)
  File "C:\CityEnergyAnalyst\CityEnergyAnalyst\cea\datamanagement\archetypes_mapper.py", line 201, in architecture_mapper
    dataframe_to_dbf(prop_architecture_df[fields], locator.get_building_architecture())
  File "C:\CityEnergyAnalyst\CityEnergyAnalyst\cea\utilities\dbf.py", line 43, in dataframe_to_dbf
    types = [type(df[i].iloc[0]) for i in df.columns]
  File "C:\CityEnergyAnalyst\CityEnergyAnalyst\cea\utilities\dbf.py", line 43, in <listcomp>
    types = [type(df[i].iloc[0]) for i in df.columns]
  File "C:\CityEnergyAnalyst\dependencies\micromamba\envs\cea\lib\site-packages\pandas\core\indexing.py", line 1103, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "C:\CityEnergyAnalyst\dependencies\micromamba\envs\cea\lib\site-packages\pandas\core\indexing.py", line 1656, in _getitem_axis
    self._validate_integer(key, axis)
  File "C:\CityEnergyAnalyst\dependencies\micromamba\envs\cea\lib\site-packages\pandas\core\indexing.py", line 1589, in _validate_integer
    raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds

- archetypes-mapper:buildings = ['B1001', 'B1002', 'B1003', 'B1004']
  (default: [])
@c0nb4
Copy link

c0nb4 commented Jul 11, 2024

Hi Ahmed,

what kind of database are you using? What type of buildings have you selected as type? Are you using CEA in the GUI or within an app?

Take Care

@ShiZhongming
Copy link
Collaborator

Hi @AhmedSerageldin
Will it be possible to share your zone.shp and typology.dbf with us?
cea@arch.ethz.ch

@ShiZhongming ShiZhongming added this to the CEA4 - Mar'25 milestone Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants