<div dir="ltr">hi,<div><br></div><div>as jonas was saying: <span style="font-family:'times new roman';font-size:14.16px;line-height:normal;background-color:rgb(253,253,253)">response.outputs['response'].</span><span style="font-family:'times new roman';font-size:14.16px;line-height:normal;background-color:rgb(253,253,253)">data = 'done' should work better</span></div><div><span style="font-family:'times new roman';font-size:14.16px;line-height:normal;background-color:rgb(253,253,253)"><br></span></div><div><span style="font-family:'times new roman';font-size:14.16px;line-height:normal;background-color:rgb(253,253,253)">Lorenzo:  do you get anything in the HTTPD server error.log file?</span></div></div><br><div class="gmail_quote"><div dir="ltr">pá 10. 6. 2016 v 15:30 odesílatel Lorenzo Bottaccioli <<a href="mailto:lorenzo.bottaccioli@gmail.com">lorenzo.bottaccioli@gmail.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>I'have changed from file to data in <span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:14.16px;background-color:rgb(253,253,253)">response.outputs['response'].</span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:14.16px;background-color:rgb(253,253,253)">data = 'done', but bow I still get an error in the response.</span><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:14.16px;background-color:rgb(253,253,253)"><br></span></div><div><span style="background-color:rgb(253,253,253)"><font color="#000000" face="Times New Roman"><div style="font-size:14.16px"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"></div><div style="font-size:14.16px"><title>500 Internal Server Error</title></div><div style="font-size:14.16px"><h1>Internal Server Error</h1></div><div style="font-size:14.16px"><p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p></div><div style="font-size:14.16px"><br></div><div style="font-size:14.16px"><br></div><div style="font-size:14.16px">The GET request is written like this:</div><div style="font-size:14.16px"><br></div><div><span style="font-size:14.16px"><a href="http://130.192.5.114:8080/wps?service=wps&version=1.0.0&request=execute&Identifier=rast_try&datainputs=raster=@xlink:href=file:///home/lorenzo/aspect_1ifGBx0" target="_blank">http://130.192.5.114:8080/wps?service=wps&version=1.0.0&request=execute&Identifier=rast_try&datainputs=raster=@xlink:href=file:///home/lorenzo/aspect_1ifGBx0</a></span><br></div><div><span style="font-size:14.16px"><br></span></div><div><span style="font-size:14.16px">In the terminal I dont get any error report.<br><br>Tnx,<br><br>Lorenzo</span></div></font></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-10 10:20 GMT+02:00 Jonas Eberle <span dir="ltr"><<a href="mailto:jonas.eberle@gmx.de" target="_blank">jonas.eberle@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000">The error "no such file or directory" comes from the following line: </div><span><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><span style="color:#000000;font-family:'Times New Roman';font-size:14.16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none;background-color:#fdfdfd">response.outputs['response'].file = 'done'</span><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><br></div></span><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000">As response is a LiteralOutput I guess it is not correct to use the file attribute, better use the data attribute:</div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><span style="color:#000000;font-family:'Times New Roman';font-size:14.16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none;background-color:#fdfdfd">response.outputs['response'].data = 'done'</span></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000">Cheers,</div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000">Jonas</div><div><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:#000000"><br><span>----- Am 10. Jun 2016 um 10:13 schrieb Jachym Cepicky <<a href="mailto:jachym.cepicky@gmail.com" target="_blank">jachym.cepicky@gmail.com</a>>:<br></span><div><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr">Hi Lorenzo,<br><div>There are two bugs as I understand. The first one:</div><br><div>IOError: [Errno 2] No such file or directory: '/tmp/pywps/pypws_process_lQqN_6/done'</div><br><div>do you have /tmp/pywps/ directory in you system (and is it writeable?)</div><br><div>The second bug is about attempt to write log to database</div><br><div>nice report btw, with the process I believe, we can fix it (both) once we find out what the problem could be</div><br><div>Jachym</div><div><span style="line-height:1.5"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr">st 8. 6. 2016 v 11:50 odesílatel Lorenzo Bottaccioli <<a href="mailto:lorenzo.bottaccioli@gmail.com" target="_blank">lorenzo.bottaccioli@gmail.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi List,<br><br>I'm trying to run a process that recives a GeoTIFF as input and response a GeoTIFF as output. But I'm having an error. The process is this:<br><div><div>from pywps import Process, ComplexInput, ComplexOutput, get_format,LiteralOutput, Format</div><br><br><div>class Raster(Process):</div><br><div>    def __init__(self):</div><div>        inputs = [ComplexInput('raster','Raster input',[Format('GEOTIFF')])]</div><br><div>        outputs = [ComplexOutput('raster_out', 'Raster output',[Format('GEOJSON')]),LiteralOutput('response', 'Output response', data_type='string')]</div><div>        super(Raster, self).__init__(</div><div>            self._handler,</div><div>            identifier='rast_try',</div><div>            title='Raster try',</div><div>            inputs=inputs,</div><div>            outputs=outputs,</div><div>            store_supported=True,</div><div>            status_supported=True</div><div>        )</div><br><div>    def _handler(self, request, response):</div><br><div>        from osgeo import gdal</div><div>        app=request.inputs['raster'][0].file</div><div>        inds = gdal.Open(app)</div><div>        outdriver = gdal.GetDriverByName('GTiff')</div><div>        outds = outdriver.CreateCopy('output.tiff', inds)</div><div>        outds.FlushCache()</div><div>        response.outputs['raster_out'].output_format = Format('GEOTIFF')</div><div>        response.outputs['raster_out'].file = 'output.tiff'</div><div>        response.outputs['response'].file = 'done'</div><div>        return response</div></div><br><div>The error that I recive is this one:</div><br><div><div>Traceback (most recent call last):</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/app/Process.py", line 156, in _run_process</div><div>    wps_response.update_status('PyWPS Process finished', 100)</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/app/WPSResponse.py", line 41, in update_status</div><div>    self.doc = self._construct_doc()</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/app/WPSResponse.py", line 171, in _construct_doc</div><div>    output_elements = [self.outputs[o].execute_xml() for o in self.outputs]</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/inout/outputs.py", line 276, in execute_xml</div><div>    literal_data_doc = WPS.LiteralData(text_type(self.data))</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/inout/basic.py", line 231, in get_data</div><div>    return IOHandler.get_data(self)</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/inout/basic.py", line 173, in get_data</div><div>    file_handler = open(self.source, mode='r')</div><div>IOError: [Errno 2] No such file or directory: '/tmp/pywps/pypws_process_lQqN_6/done'</div><div>ERROR:root:Service error: near "''": syntax error</div><div>Traceback (most recent call last):</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/app/Service.py", line 358, in _parse_and_execute</div><div>    wps_response = process.execute(wps_request, uuid)</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/app/Process.py", line 145, in execute</div><div>    wps_response = self._run_process(wps_request, wps_response)</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/app/Process.py", line 178, in _run_process</div><div>    wps_response.update_status('Process error: %s.%s Line %i %s' % (fname, method_name, exc_tb.tb_lineno, e), -1)</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/app/WPSResponse.py", line 47, in update_status</div><div>    update_response(self.uuid, self)</div><div>  File "/usr/local/lib/python2.7/dist-packages/pywps-4.0-py2.7.egg/pywps/dblog.py", line 67, in update_response</div><div>    cur.execute(update)</div><div>OperationalError: near "''": syntax error</div></div><div><br><br>How can I fix this?<br><br>Best,<br><br>Lorenzo</div><br></div>
_______________________________________________<br>
pywps-dev mailing list<br>
<a href="mailto:pywps-dev@lists.osgeo.org" target="_blank">pywps-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pywps-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/pywps-dev</a></blockquote></div>
<br>_______________________________________________<br>pywps-dev mailing list<br><a href="mailto:pywps-dev@lists.osgeo.org" target="_blank">pywps-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/pywps-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/pywps-dev</a></blockquote></div></div><br></div></div></div></div></blockquote></div><br></div>
</blockquote></div>