-
-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'ERROR - missing coords parameter' despite coords parameter provided #859
Comments
Sorry I cannot reproduce/worksforme. I notice that the request is missing the
|
Well... I feel stupid... shouldn't file bug reports last thing on a Friday. |
Re-opened as discovered that although this works: This does not work: I've updated Issue description to reflect this. |
Sorry I still cannot reproduce (no ERROR). |
I can only comment on this:
The default is GeoJSON if no format "is proposed". When you open that URL in a browser (which I assume here) , the browser will propose HTML format via the |
Thanks @justb4 - can confirm it works with I still think it should not be behaving in this way i.e. claiming 'ERROR - missing coords parameter'. I found the following error in Chrome's console, something appears to be getting mangled at some point:
|
Description
My request to the position endpoint of my xarray-edr collection is not returning anything (just seems to refresh the page), and also results in the log recording an error of missing coords parameter.
Steps to Reproduce
My request:
http://localhost:5001/collections/dbossh/position?coords=POINT(0%200)
Note: adding '&f=json' causes it to work correctly. As far as I'm aware this should not be required, as it should default to json.
My config, and dump of the netCDF source:
dassh-config.txt
ncdump_out.txt
Expected behavior
A json of a subset of my dataset is returned (empty in this case, since there are no data points at POINT(0,0))
Screenshots/Tracebacks
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/l10n.py:357} DEBUG - Got locale 'en-GB,en-US;q=0.9,en;q=0.8' from 'Accept-Language' header
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/l10n.py:227} DEBUG - 'en_US' matches requested 'en-GB,en-US;q=0.9,en;q=0.8'
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/l10n.py:411} DEBUG - Setting Content-Language to en-US
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:2942} DEBUG - Processing query parameters
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:2944} DEBUG - Processing datetime parameter
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:2954} DEBUG - Processing parameter-name parameter
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:2959} DEBUG - Processing coords parameter
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:2974} DEBUG - Processing z parameter
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:2977} DEBUG - Loading provider
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/util.py:447} DEBUG - Searching for provider type edr
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/plugin.py:88} DEBUG - Plugins: {'CSV': 'pygeoapi.provider.csv_.CSVProvider', 'Elasticsearch': 'pygeoapi.provider.elasticsearch_.ElasticsearchProvider', 'ElasticsearchCatalogue': 'pygeoapi.provider.elasticsearch_.ElasticsearchCatalogueProvider', 'GeoJSON': 'pygeoapi.provider.geojson.GeoJSONProvider', 'OGR': 'pygeoapi.provider.ogr.OGRProvider', 'PostgreSQL': 'pygeoapi.provider.postgresql.PostgreSQLProvider', 'SQLiteGPKG': 'pygeoapi.provider.sqlite.SQLiteGPKGProvider', 'MongoDB': 'pygeoapi.provider.mongo.MongoProvider', 'FileSystem': 'pygeoapi.provider.filesystem.FileSystemProvider', 'rasterio': 'pygeoapi.provider.rasterio_.RasterioProvider', 'xarray': 'pygeoapi.provider.xarray_.XarrayProvider', 'MVT': 'pygeoapi.provider.mvt.MVTProvider', 'TinyDBCatalogue': 'pygeoapi.provider.tinydb_.TinyDBCatalogueProvider', 'SensorThings': 'pygeoapi.provider.sensorthings.SensorThingsProvider', 'xarray-edr': 'pygeoapi.provider.xarray_edr.XarrayEDRProvider'}
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/plugin.py:100} DEBUG - package name: pygeoapi.provider.xarray_edr
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/plugin.py:101} DEBUG - class name: XarrayEDRProvider
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/provider/xarray_edr.py:80} DEBUG - Query parameters: {'query_type': 'position', 'instance': None, 'format_': 'html', 'datetime_': None, 'select_properties': [], 'wkt': <shapely.geometry.point.Point object at 0x7fba6180c880>, 'z': None}
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/provider/xarray_edr.py:82} DEBUG - Query type: position
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/provider/xarray_edr.py:86} DEBUG - Processing WKT
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/provider/xarray_edr.py:87} DEBUG - Geometry type: Point
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/provider/xarray_edr.py:99} DEBUG - Processing parameter-name
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/provider/xarray_edr.py:105} DEBUG - instance: None
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/provider/xarray_edr.py:111} DEBUG - query parameters: {'latitude': 0.0, 'longitude': 0.0}
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/provider/xarray_.py:315} DEBUG - Creating CoverageJSON domain
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/util.py:334} DEBUG - using default templates: /home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/templates
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/werkzeug/_internal.py:225} INFO - 192.171.193.10 - - [25/Feb/2022 16:45:36] "GET /collections/dbossh/position?coords=POINT(0%200)f=json HTTP/1.1" 200 -
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/werkzeug/_internal.py:225} INFO - 192.171.193.10 - - [25/Feb/2022 16:45:36] "GET /static/css/default.css HTTP/1.1" 304 -
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/werkzeug/_internal.py:225} INFO - 192.171.193.10 - - [25/Feb/2022 16:45:36] "GET /static/img/logo.png HTTP/1.1" 304 -
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/l10n.py:357} DEBUG - Got locale 'en-GB,en-US;q=0.9,en;q=0.8' from 'Accept-Language' header
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/l10n.py:227} DEBUG - 'en_US' matches requested 'en-GB,en-US;q=0.9,en;q=0.8'
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/l10n.py:411} DEBUG - Setting Content-Language to en-US
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:2942} DEBUG - Processing query parameters
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:2944} DEBUG - Processing datetime parameter
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:2954} DEBUG - Processing parameter-name parameter
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:2959} DEBUG - Processing coords parameter
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/pygeoapi-0.12.dev0-py3.8.egg/pygeoapi/api.py:3202} ERROR - missing coords parameter
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/werkzeug/_internal.py:225} INFO - 192.171.193.10 - - [25/Feb/2022 16:45:36] "GET /collections/dbossh/position?f=jsonld HTTP/1.1" 400 -
[2022-02-25T16:45:36Z] {/home/root/pygeoapi/lib/python3.8/site-packages/werkzeug/_internal.py:225} INFO - 192.171.193.10 - - [25/Feb/2022 16:45:36] "GET /static/img/pygeoapi.png HTTP/1.1" 304 -
[2022-02-25T16:45:37Z] {/home/root/pygeoapi/lib/python3.8/site-packages/werkzeug/_internal.py:225} INFO - 192.171.193.10 - - [25/Feb/2022 16:45:37] "GET /static/img/favicon.ico HTTP/1.1" 304 -
It appears to complete correctly but then immediately initiates a new GET with the coords parameter now empty.
Environment
3.8.10
0.12.dev0
The text was updated successfully, but these errors were encountered: