diving-into-pygeoapi icon indicating copy to clipboard operation
diving-into-pygeoapi copied to clipboard

Error while running on m1

Open krishnaglodha opened this issue 2 years ago • 1 comments

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.

krishnaglodha avatar Nov 19 '22 06:11 krishnaglodha

@krishnaglodha are you still getting this?

doublebyte1 avatar Dec 07 '23 14:12 doublebyte1