Skip to content

AttributeError: module 'fiona' has no attribute 'path'

At friday I deployed a new staging version of the Earthquake Explorer - and there is currently an issue in starting shakyground.

Traceback (most recent call last):
  File "/usr/src/app/bin/main.py", line 21, in <module>
    from shakyground2.workflows import shakemaps_from_quakeml
  File "/usr/src/app/shakyground2/shakyground2/workflows.py", line 11, in <module>
    from shakyground2.regionalization import DEFAULT_GLOBAL_REGIONALIZATION, RegionalizationSet
  File "/usr/src/app/shakyground2/shakyground2/regionalization.py", line 324, in <module>
    DEFAULT_GLOBAL_REGIONALIZATION = RegionalizationSet.from_json(
  File "/usr/src/app/shakyground2/shakyground2/regionalization.py", line 261, in from_json
    Regionalization.from_json(name, regionalization_file, mapping_file)
  File "/usr/src/app/shakyground2/shakyground2/regionalization.py", line 194, in from_json
    dframe = gpd.GeoDataFrame.from_file(geojson_file, driver="GeoJSON")
  File "/usr/local/lib/python3.8/dist-packages/geopandas/geodataframe.py", line 561, in from_file
    return geopandas.io.file._read_file(filename, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/geopandas/io/file.py", line 281, in _read_file
    return _read_file_fiona(
  File "/usr/local/lib/python3.8/dist-packages/geopandas/io/file.py", line 299, in _read_file_fiona
    if _is_zip(str(path_or_bytes)):
  File "/usr/local/lib/python3.8/dist-packages/geopandas/io/file.py", line 166, in _is_zip
    parsed = fiona.path.ParsedPath.from_uri(path)
AttributeError: module 'fiona' has no attribute 'path'

For me it looks like a problem with the versions of geopandas and fiona - some kind of incompatibility.

The docker container don't start, so I need some more time to figure out the exact versions of the dependencies that are installed.

I guess with some version constraints we can get it back working.