Skip to content

geopandas 1.0.0 or pyogrio 0.9.0 doesn't support OGR_GMT output? #3301

Closed
@seisman

Description

@seisman

geopandas v1.0.0 was released a few hours ago and now our Docs workflow fails to build (https://github.com/GenericMappingTools/pygmt/actions/runs/9559533732/job/26634813440) which is not caught in our "GMT Dev Tests" workflow (why?):

Extension error:
Here is a summary of the problems encountered when running the examples:

Unexpected failing examples:

    ../examples/get_started/04_table_inputs.py failed leaving traceback:

    Traceback (most recent call last):
      File "/home/runner/work/pygmt/pygmt/examples/get_started/04_table_inputs.py", line 111, in <module>
        fig.plot(data=gdf, style="c0.2c", fill="purple")
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/pygmt/helpers/decorators.py", line 609, in new_module
        return module_func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/pygmt/helpers/decorators.py", line 773, in new_module
        return module_func(*bound.args, **bound.kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/pygmt/src/plot.py", line 258, in plot
        with lib.virtualfile_in(
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/contextlib.py", line 137, in __enter__
        return next(self.gen)
               ^^^^^^^^^^^^^^
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/pygmt/helpers/tempfile.py", line 164, in tempfile_from_geojson
        geojson.to_file(**ogrgmt_kwargs)
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/geopandas/geodataframe.py", line 1536, in to_file
        _to_file(self, filename, driver, schema, index, **kwargs)
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/geopandas/io/file.py", line 686, in _to_file
        _to_file_pyogrio(df, filename, driver, schema, crs, mode, metadata, **kwargs)
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/geopandas/io/file.py", line 748, in _to_file_pyogrio
        pyogrio.write_dataframe(df, filename, driver=driver, metadata=metadata, **kwargs)
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/pyogrio/geopandas.py", line 456, in write_dataframe
        path, driver = _get_write_path_driver(path, driver, append=append)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/pyogrio/raw.py", line 564, in _get_write_path_driver
        if not ogr_driver_supports_write(driver):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "pyogrio/_ogr.pyx", line 105, in pyogrio._ogr.ogr_driver_supports_write
      File "pyogrio/_ogr.pyx", line 287, in pyogrio._ogr._get_driver_metadata_item
    pyogrio.errors.DataSourceError: Could not obtain driver: OGR_GMT (check that it was installed correctly into GDAL)

    ../examples/gallery/lines/roads.py failed leaving traceback:

    Traceback (most recent call last):
      File "/home/runner/work/pygmt/pygmt/examples/gallery/lines/roads.py", line 19, in <module>
        gdf = gpd.read_file(
              ^^^^^^^^^^^^^^
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/geopandas/io/file.py", line 294, in _read_file
        return _read_file_pyogrio(
               ^^^^^^^^^^^^^^^^^^^
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/geopandas/io/file.py", line 547, in _read_file_pyogrio
        return pyogrio.read_dataframe(path_or_bytes, bbox=bbox, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/pyogrio/geopandas.py", line 261, in read_dataframe
        result = read_func(
                 ^^^^^^^^^^
      File "/home/runner/micromamba/envs/pygmt/lib/python3.12/site-packages/pyogrio/raw.py", line 196, in read
        return ogr_read(
               ^^^^^^^^^
      File "pyogrio/_io.pyx", line 1239, in pyogrio._io.ogr_read
      File "pyogrio/_io.pyx", line 219, in pyogrio._io.ogr_open
    pyogrio.errors.DataSourceError: No driver registered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions