<div>Hi Suzana,<br></div><div><br></div><div>well spotted, this bug is present in the master branch. Please open a new issue, and if you are able to, then submit a matching pull request. As a reminder, detailed contribution instructions can be accessed here: <a href="https://pywps.readthedocs.io/en/latest/development.html">https://pywps.readthedocs.io/en/latest/development.html</a><br></div><div><br></div><div>Thank you for contributing to PyWPS.<br></div><div><br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-user"><div>-- <br></div><div>Luís Moreira de Sousa<br></div><div>Phone: +31 628 544 755<br></div><div>Email: <a href="mailto:luis.de.sousa@protonmail.ch">luis.de.sousa@protonmail.ch</a><br></div><div>RingID: ring:7ca91d83f4f9dec82fec9f1144b8e5c1ef2a110c<br></div><div>URL: <a href="https://ldesousa.github.io">https://ldesousa.github.io</a><br></div></div><div><br></div><div class="protonmail_signature_block-proton">Sent with <a target="_blank" href="https://protonmail.com">ProtonMail</a> Secure Email.<br></div></div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On Tuesday, November 6, 2018 5:08 PM, Suzana Barreto <suzana.barreto@envsys.co.uk> wrote:<br></div><div> <br></div><blockquote type="cite" class="protonmail_quote"><div dir="ltr"><div>Hi All,<br></div><div><br></div><div>I have found the bug which is in basic.py class LiteralInput, when it initialises BasicIO, it sets the min_occurs, max_occurs to 1 instead of using the passed in parameter.<br></div><div>Do I need to fix this in the code base, following the given procedures of course? <br></div><div><br></div><div>Thanks,<br></div><div>Suzana<br></div><div><br></div></div><div><br></div><div class="gmail_quote"><div dir="ltr">On Tue, 6 Nov 2018 at 15:09, Suzana Barreto <<a href="mailto:suzana.barreto@envsys.co.uk">suzana.barreto@envsys.co.uk</a>> wrote:<br></div><blockquote data-darkreader-inline-border-left="" class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; --darkreader-inline-border-left:#4c4b49;"><div dir="ltr"><div>Hi All,<br></div><div><br></div><div>I am in the process of testing a process I created using PyWPS 4.  I have found an odd issue with the LiteralInputs for my process.  So for example, my process takes an input parameter (stats) where I have a max_occurs=9 which should allow for any number of strings detailing the statistics I would like calculated for a given input file. When I issue a request with a number of values ('sum', 'median', 'std') for that particular parameter, my response contains the result for only 1 of the statistics for that parameter.  I traced the issue to service.py (create_literal_inputs), line 216 where a deque is created using the LiteralInput's max_occurs parameter to limit the size.  Unfortunately, it appears that this attribute is always 1.  When I do a describeProcess request, I notice that the max_occurs is also equal to 1 and this happens regardless of whatever value I change the max_occurs to on that or any other LiteralInputs for my process.  So my question is, has anyone come across this issue?  Am I doing something wrong?  Below is the code showing how I have defined the inputs.<br></div><div><br></div><div><pre data-darkreader-inline-color="" style="color: rgb(0, 0, 0); font-family: "DejaVu Sans Mono"; font-size: 9pt; --darkreader-inline-color:#fbf6ed;"><div><span data-darkreader-inline-color="" style="color: rgb(0, 0, 128); --darkreader-inline-color:#9dbcf1;"><b>class </b></span>BasicZonalStats(Process):<br></div><div>    <span data-darkreader-inline-color="" style="color: rgb(0, 0, 128); --darkreader-inline-color:#9dbcf1;"><b>def </b></span><span data-darkreader-inline-color="" style="color: rgb(178, 0, 178); --darkreader-inline-color:#f27feb;">__init__</span>(<span data-darkreader-inline-color="" style="color: rgb(148, 85, 141); --darkreader-inline-color:#cfaec4;">self</span>):<br></div><div>        inputs = [ComplexInput(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'aoi_ndvi'</b></span>,<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'Raster ndvi'</b></span>,<br></div><div>                               <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">supported_formats</span>=[Format(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'image/tiff'</b></span>), Format(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'application/x-ogc-wcs'</b></span>)],<br></div><div>                               <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">min_occurs</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 0, 255); --darkreader-inline-color:#578ae3;">1</span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">max_occurs</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 0, 255); --darkreader-inline-color:#578ae3;">1</span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">mode</span>=MODE.NONE),<br></div><div>                  LiteralInput(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'band'</b></span>,<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'the band to calculate stats for'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">data_type</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'integer'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">min_occurs</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 0, 255); --darkreader-inline-color:#578ae3;">1</span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">max_occurs</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 0, 255); --darkreader-inline-color:#578ae3;">1</span>,<br></div><div>                               <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">mode</span>=MODE.SIMPLE),<br></div><div>                  LiteralInput(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'stats'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'Statistics to calculate'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">data_type</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'string'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">min_occurs</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 0, 255); --darkreader-inline-color:#578ae3;">0</span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">max_occurs</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 0, 255); --darkreader-inline-color:#578ae3;">9</span>,<br></div><div>                               <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">allowed_values</span>=(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'sum'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'std'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'median'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'majority'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'minority'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'unique'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'range'</b></span>,<br></div><div>                                               <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'nodata'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'nan'</b></span>), <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">mode</span>=MODE.SIMPLE),<br></div><div>                  LiteralInput(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'nodata'</b></span>,<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'Nodata value'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">data_type</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'integer'</b></span>,<span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">mode</span>=MODE.SIMPLE),<br></div><div>                  ComplexInput(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'zones'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'Vector polygons to calculate stats on.'</b></span>,<br></div><div>                               <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">supported_formats</span>=[Format(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'application/json'</b></span>)],<br></div><div>                               <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">min_occurs</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 0, 255); --darkreader-inline-color:#578ae3;">1</span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">max_occurs</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 0, 255); --darkreader-inline-color:#578ae3;">1</span>, <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">mode</span>=MODE.NONE)<br></div><div><br></div><div>                  ]<br></div><div>        outputs = [ComplexOutput(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'zonal_stats'</b></span>, <span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'Attribute Table'</b></span>,<br></div><div>                                 <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">supported_formats</span>=[Format(<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'application/json'</b></span>)],<br></div><div>                                 )]<br></div><div><br></div><div>        <span data-darkreader-inline-color="" style="color: rgb(0, 0, 128); --darkreader-inline-color:#9dbcf1;">super</span>(BasicZonalStats, <span data-darkreader-inline-color="" style="color: rgb(148, 85, 141); --darkreader-inline-color:#cfaec4;">self</span>).<span data-darkreader-inline-color="" style="color: rgb(178, 0, 178); --darkreader-inline-color:#f27feb;">__init__</span>(<br></div><div>            <span data-darkreader-inline-color="" style="color: rgb(148, 85, 141); --darkreader-inline-color:#cfaec4;">self</span>._handler,<br></div><div>            <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">identifier</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'zonal'</b></span>,<br></div><div>            <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">version</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>'0.1'</b></span>,<br></div><div>            <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">title</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>"Basic Zonal Statistics using Rasterstats"</b></span>,<br></div><div>            <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">abstract</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>"This is a naive and basic WPS, it assumes that both vector and raster inputs are in the same"<br></b></span><span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>                     "projection and as such does not do any error checking.  This will be fixed at a later stage so f"<br></b></span><span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>                     "or now please ensure that the inputs are in the same projection."</b></span>,</div><div>            <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">profile</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 128, 128); --darkreader-inline-color:#aeffff;"><b>''</b></span>,<br></div><div>            <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">inputs</span>=inputs,<br></div><div>            <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">outputs</span>=outputs,<br></div><div>            <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">store_supported</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 0, 128); --darkreader-inline-color:#9dbcf1;"><b>True</b></span>,<br></div><div>            <span data-darkreader-inline-color="" style="color: rgb(102, 0, 153); --darkreader-inline-color:#cf89ea;">status_supported</span>=<span data-darkreader-inline-color="" style="color: rgb(0, 0, 128); --darkreader-inline-color:#9dbcf1;"><b>True<br></b></span><span data-darkreader-inline-color="" style="color: rgb(0, 0, 128); --darkreader-inline-color:#9dbcf1;"><b>        </b></span>)</div></pre><div>Any help with this would be much appreciated. <br></div><div>Thanks,<br></div><div>Suzana<br></div><div>-- <br></div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><p style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-stretch: normal;"><span data-darkreader-inline-bgcolor="" style="background-color: rgb(255, 255, 255); --darkreader-inline-bgcolor:#252527;"><span data-darkreader-inline-color="" style="color: gray; --darkreader-inline-color:#c9c3b8;"><span style="font-family:arial, sans-serif"><span style="font-size:7.5pt"><b>Dr Suzana Barreto<br>Software Analyst<br>Environment Systems</b><br>Tel: <a data-darkreader-inline-color="" style="color: rgb(17, 85, 204); --darkreader-inline-color:#7fb2e3;" href="tel:%2B44%20%280%29%201970%20626688" value="+441970626688" target="_blank">+44 (0) 1970 626688</a><br><a data-darkreader-inline-color="" style="color: rgb(17, 85, 204); --darkreader-inline-color:#7fb2e3;" href="http://www.envsys.co.uk/" target="_blank">www.envsys.co.uk</a></span></span></span></span></p><p style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-stretch: normal;"><span data-darkreader-inline-bgcolor="" style="background-color: rgb(255, 255, 255); --darkreader-inline-bgcolor:#252527;"><span data-darkreader-inline-color="" style="color: gray; --darkreader-inline-color:#c9c3b8;"><span style="font-family:arial, sans-serif"><span style="font-size:7.5pt">The information contained in this e-mail is intended only for the use of the person(s) to whom it is addressed and may contain confidential or privileged information. If you have received this e-mail in error please contact the sender and delete the material without copying, distributing or disclosing the content. All reasonable precautions have been taken to ensure that this e-mail is free from any virus, however, the recipient should verify this to be the case. Please 'think before you print'</span></span></span></span><br></p></div></div></div></div></div></div></blockquote></div><div><br></div><div><br></div><div>-- <br></div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><p style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-stretch: normal;"><span data-darkreader-inline-bgcolor="" style="background-color: rgb(255, 255, 255); --darkreader-inline-bgcolor:#252527;"><span data-darkreader-inline-color="" style="color: gray; --darkreader-inline-color:#c9c3b8;"><span style="font-family:arial, sans-serif"><span style="font-size:7.5pt"><b>Dr Suzana Barreto<br>Software Analyst<br>Environment Systems</b><br>Tel: <a data-darkreader-inline-color="" style="color: rgb(17, 85, 204); --darkreader-inline-color:#7fb2e3;" href="tel:%2B44%20%280%29%201970%20626688" value="+441970626688" target="_blank">+44 (0) 1970 626688</a><br><a data-darkreader-inline-color="" style="color: rgb(17, 85, 204); --darkreader-inline-color:#7fb2e3;" href="http://www.envsys.co.uk/" target="_blank">www.envsys.co.uk</a></span></span></span></span></p><p style="font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; font-stretch: normal;"><span data-darkreader-inline-bgcolor="" style="background-color: rgb(255, 255, 255); --darkreader-inline-bgcolor:#252527;"><span data-darkreader-inline-color="" style="color: gray; --darkreader-inline-color:#c9c3b8;"><span style="font-family:arial, sans-serif"><span style="font-size:7.5pt">The information contained in this e-mail is intended only for the use of the person(s) to whom it is addressed and may contain confidential or privileged information. If you have received this e-mail in error please contact the sender and delete the material without copying, distributing or disclosing the content. All reasonable precautions have been taken to ensure that this e-mail is free from any virus, however, the recipient should verify this to be the case. Please 'think before you print'</span></span></span></span><br></p></div></div></div></div></blockquote><div><br></div>