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

Building retrofit fails with local building dataset #617

Open
navarroc opened this issue Sep 27, 2024 · 0 comments
Open

Building retrofit fails with local building dataset #617

navarroc opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@navarroc
Copy link
Member

When doing building retrofits with a local building dataset, the "id" is a file path which seems to break the python library creating the new building dataset shapefile layer. If after loading the local dataset you set the "id" to something like "temp-id", it works just fine.

Traceback (most recent call last):
  File "pyogrio/_io.pyx", line 2179, in pyogrio._io.create_ogr_dataset_layer
  File "pyogrio/_err.pyx", line 183, in pyogrio._err.exc_wrap_pointer
pyogrio._err.CPLE_AppDefinedError: Failed to create file /tmp/tmprt_u5ez3/tmp_updated_/home/cnavarro/.incore/cache_data/648c22dd689743dc9dedf242006adc5a9c21de9a89c016323dccfedef94f7737/5dbc8478b9219c06dd242c0d/joplin_bldg_inventory_v6

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cnavarro/git/pyincore/tests/pyincore/analyses/buildingstructuraldamage/test_buildingstructuraldamage_retrofit.py", line 70, in <module>
    run_with_base_class()
  File "/home/cnavarro/git/pyincore/tests/pyincore/analyses/buildingstructuraldamage/test_buildingstructuraldamage_retrofit.py", line 61, in run_with_base_class
    tornado_bldg_dmg.run_analysis()
  File "/home/cnavarro/git/pyincore/venv/lib/python3.9/site-packages/pyincore-1.19.0-py3.9.egg/pyincore/baseanalysis.py", line 453, in run_analysis
    return self.run()
  File "/home/cnavarro/git/pyincore/venv/lib/python3.9/site-packages/pyincore-1.19.0-py3.9.egg/pyincore/analyses/buildingstructuraldamage/buildingstructuraldamage.py", line 51, in run
    bldg_dataset, tmpdirname, _ = DatasetUtil.construct_updated_inventories(
  File "/home/cnavarro/git/pyincore/venv/lib/python3.9/site-packages/pyincore-1.19.0-py3.9.egg/pyincore/utils/datasetutil.py", line 192, in construct_updated_inventories
    inventory_df.to_file(file_path)
  File "/home/cnavarro/git/pyincore/venv/lib/python3.9/site-packages/geopandas-1.0.0a1-py3.9.egg/geopandas/geodataframe.py", line 1349, in to_file
    _to_file(self, filename, driver, schema, index, **kwargs)
  File "/home/cnavarro/git/pyincore/venv/lib/python3.9/site-packages/geopandas-1.0.0a1-py3.9.egg/geopandas/io/file.py", line 666, in _to_file
    _to_file_pyogrio(df, filename, driver, schema, crs, mode, **kwargs)
  File "/home/cnavarro/git/pyincore/venv/lib/python3.9/site-packages/geopandas-1.0.0a1-py3.9.egg/geopandas/io/file.py", line 726, in _to_file_pyogrio
    pyogrio.write_dataframe(df, filename, driver=driver, **kwargs)
  File "/home/cnavarro/git/pyincore/venv/lib/python3.9/site-packages/pyogrio-0.8.0-py3.9-linux-x86_64.egg/pyogrio/geopandas.py", line 645, in write_dataframe
    write(
  File "/home/cnavarro/git/pyincore/venv/lib/python3.9/site-packages/pyogrio-0.8.0-py3.9-linux-x86_64.egg/pyogrio/raw.py", line 709, in write
    ogr_write(
  File "pyogrio/_io.pyx", line 2294, in pyogrio._io.ogr_write
  File "pyogrio/_io.pyx", line 2193, in pyogrio._io.create_ogr_dataset_layer
pyogrio.errors.DataLayerError: Failed to create file /tmp/tmprt_u5ez3/tmp_updated_/home/cnavarro/.incore/cache_data/648c22dd689743dc9dedf242006adc5a9c21de9a89c016323dccfedef94f7737/5dbc8478b9219c06dd242c0d/joplin_bldg_inventory_v6
@navarroc navarroc added the bug Something isn't working label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant