[OSGeoLive] #2284: Upgrade to pygeoapi 0.9.0 causes demo error

OSGeoLive trac_osgeolive at osgeo.org
Sun Dec 13 10:07:24 PST 2020


#2284: Upgrade to pygeoapi 0.9.0 causes demo error
-----------------------+----------------------------
 Reporter:  kalxas     |       Owner:  osgeolive@…
     Type:  defect     |      Status:  new
 Priority:  critical   |   Milestone:  OSGeoLive14.0
Component:  OSGeoLive  |  Resolution:
 Keywords:  pygeoapi   |
-----------------------+----------------------------

Comment (by kalxas):

 Hitting the collections after the fix gives this error:

 {{{
 [2020-12-13T17:44:36Z] {/usr/lib/python3/dist-
 packages/werkzeug/_internal.py:122} INFO - 127.0.0.1 - - [13/Dec/2020
 17:44:36] "GET /collections?f=html HTTP/1.1" 500 -
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/pygeoapi/util.py", line 351, in
 get_provider_default
     default = (next(d for i, d in enumerate(providers) if 'default' in d
 StopIteration

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/flask/app.py", line 2463, in
 __call__
     return self.wsgi_app(environ, start_response)
   File "/usr/lib/python3/dist-packages/flask/app.py", line 2449, in
 wsgi_app
     response = self.handle_exception(e)
   File "/usr/lib/python3/dist-packages/flask/app.py", line 1866, in
 handle_exception
     reraise(exc_type, exc_value, tb)
   File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in
 reraise
     raise value
   File "/usr/lib/python3/dist-packages/flask/app.py", line 2446, in
 wsgi_app
     response = self.full_dispatch_request()
   File "/usr/lib/python3/dist-packages/flask/app.py", line 1951, in
 full_dispatch_request
     rv = self.handle_user_exception(e)
   File "/usr/lib/python3/dist-packages/flask/app.py", line 1820, in
 handle_user_exception
     reraise(exc_type, exc_value, tb)
   File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in
 reraise
     raise value
   File "/usr/lib/python3/dist-packages/flask/app.py", line 1949, in
 full_dispatch_request
     rv = self.dispatch_request()
   File "/usr/lib/python3/dist-packages/flask/app.py", line 1935, in
 dispatch_request
     return self.view_functions[rule.endpoint](**req.view_args)
   File "/usr/lib/python3/dist-packages/pygeoapi/flask_app.py", line 168,
 in collections
     headers, status_code, content = api_.describe_collections(
   File "/usr/lib/python3/dist-packages/pygeoapi/api.py", line 106, in
 inner
     return func(cls, headers_, format_, *args, **kwargs)
   File "/usr/lib/python3/dist-packages/pygeoapi/linked_data.py", line 54,
 in inner
     return func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/pygeoapi/api.py", line 340, in
 describe_collections
     collection_data = get_provider_default(v['providers'])
   File "/usr/lib/python3/dist-packages/pygeoapi/util.py", line 356, in
 get_provider_default
     default = providers[0]
 KeyError: 0

 }}}

-- 
Ticket URL: <https://trac.osgeo.org/osgeolive/ticket/2284#comment:2>
OSGeoLive <https://live.osgeo.org/>
self-contained bootable DVD, USB thumb drive or Virtual Machine based on Lubuntu, that allows you to try a wide variety of open source geospatial software without installing anything.


More information about the osgeolive mailing list