geopython / pywps

PyWPS is an implementation of the Web Processing Service standard from the Open Geospatial Consortium. PyWPS is written in Python.
https://pywps.org
MIT License
178 stars 117 forks source link

invalid mimetype #619

Closed cehbrecht closed 3 years ago

cehbrecht commented 3 years ago

Description

When sending a request with a compex output the pywps services may fail:

File "/usr/local/anaconda/envs/rook/lib/python3.7/site-packages/pywps/app/Process.py", line 478, in setup_outputs_from_wps_request
    'MimeType ' + mimetype + ' not valid')
TypeError: can only concatenate str (not "NoneType") to str

The default mimetype has changed from empty string '' to None in pywps 4.5.0 which lets to this error:

https://github.com/geopython/pywps/blob/20147561c6985525c26b31ee9eac86192487b07e/pywps/app/WPSRequest.py#L525

Environment

Steps to Reproduce

Run the Emu inout process with a post request (or using birdy):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wps:Execute service="WPS" version="1.0.0" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
../wpsExecute_request.xsd">
    <ows:Identifier>inout</ows:Identifier>
    <wps:ResponseForm>
        <wps:ResponseDocument storeExecuteResponse="true" status="true">
            <wps:Output asReference="true">
                <ows:Identifier>output</ows:Identifier>
            </wps:Output>
        </wps:ResponseDocument>
    </wps:ResponseForm>
</wps:Execute>

Additional Information

cehbrecht commented 3 years ago

fixed by PR #620