geopython / diving-into-pygeoapi

pygeoapi is an OGC Reference Implementation supporting numerous OGC API specifications. This workshop will cover publishing geospatial data to the Web using pygeoapi in support of the suite of OGC API standards.
https://dive.pygeoapi.io
MIT License
20 stars 17 forks source link

Error while running on m1 #83

Open krishnaglodha opened 1 year ago

krishnaglodha commented 1 year ago

Hi. I 'm trying to run setup on m1 mac using docker run --rm -p 5000:80 geopython/pygeoapi:latest but getting following error

START /entrypoint.sh
Trying to generate openapi.yml
Error Number: 1, Type: Failure, Msg: PROJ: proj_create_from_database: SQLite error on SELECT name, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM projected_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name
Traceback (most recent call last):
  File "/pygeoapi/pygeoapi/provider/ogr.py", line 844, in handler
    raise ProviderGenericError(last_error)
pygeoapi.provider.base.ProviderGenericError: PROJ: proj_create_from_database: SQLite error on SELECT name, coordinate_system_auth_name, coordinate_system_code, geodetic_crs_auth_name, geodetic_crs_code, conversion_auth_name, conversion_code, area_of_use_auth_name, area_of_use_code, text_definition, deprecated FROM projected_crs WHERE auth_name = ? AND code = ?: no such column: area_of_use_auth_name

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/pygeoapi", line 11, in <module>
    load_entry_point('pygeoapi', 'console_scripts', 'pygeoapi')()
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1134, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1059, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1665, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1665, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 1401, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/dist-packages/click/core.py", line 767, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/pygeoapi/pygeoapi/openapi.py", line 1206, in generate
    content = yaml.safe_dump(get_oas(s), default_flow_style=False)
File "/pygeoapi/pygeoapi/openapi.py", line 1159, in get_oas
    return get_oas_30(cfg)
  File "/pygeoapi/pygeoapi/openapi.py", line 489, in get_oas_30
    p = load_plugin('provider', get_provider_by_type(
  File "/pygeoapi/pygeoapi/plugin.py", line 108, in load_plugin
    plugin = class_(plugin_def)
  File "/pygeoapi/pygeoapi/provider/ogr.py", line 160, in __init__
    source.ImportFromEPSG(self.source_srs)
  File "/usr/lib/python3/dist-packages/osgeo/osr.py", line 728, in ImportFromEPSG
    return _osr.SpatialReference_ImportFromEPSG(self, *args)
SystemError: <built-in function SpatialReference_ImportFromEPSG> returned a result with an error set
ERROR: openapi.yml could not be generated ERROR

I do have GDAL installed on machine.

doublebyte1 commented 10 months ago

@krishnaglodha are you still getting this?