Closed geotom closed 2 years ago
Yes, I will add a coverage test for this. Latest next week
Hi @cehbrecht: I have added tests and also fixed the issue at the source of the problem, which was:
When parsing BBox inputs, a owslib BoundingBox
was created and its crs property was simply set as input['crs']. The problem is that the crs propery of the BoundingBox
is of the type owslib.crs.Crs
. This lead to a failing JSONEncoder.
I removed the check in the JSONEncoder and made now sure that the crs is properly set as string when doing the input parsing.
@geotom @tomkralidis should we use getcodeurn()
instead of str(bbox.crs)
?:
https://github.com/geopython/OWSLib/blob/2f55bee4514ab114ab43b5495d719c66fd5dce79/owslib/crs.py#L1848
The difference between getcodeurn()
instead of str(bbox.crs)
is probably cosmetic as str()
indirectly calls exactly this method. Not sure what you'd prefer.
+1 to use getcodeurn()
.
I changed it accordingly and also removed the comment from it. I hope we can move forward.
@geotom ... test is failing now. None
value of bbox.crs
is not handled.
Should not fail anymore @cehbrecht
@geotom thanks :)
Overview
Fixed the JSON encoding of the CRS type which crashed an execution request when the request was serialized
Related Issue / Discussion
This should fix the problem described in #610
Additional Information
The type
owslib.crs.Crs
cannot be encoded by the default JSON encodingContribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)