<div dir="ltr">Hi Lorenzo,<div><br></div><div>There are two bugs as I understand. The first one:</div><div><br></div><div>IOError: [Errno 2] No such file or directory: '/tmp/pywps/pypws_process_lQqN_6/done'</div><div><br></div><div>do you have /tmp/pywps/ directory in you system (and is it writeable?)</div><div><br></div><div>The second bug is about attempt to write log to database</div><div><br></div><div>nice report btw, with the process I believe, we can fix it (both) once we find out what the problem could be</div><div><br></div><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">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:<div><br></div><div><div>from pywps import Process, ComplexInput, ComplexOutput, get_format,LiteralOutput, Format</div><div><br></div><div><br></div><div>class Raster(Process):</div><div><br></div><div> def __init__(self):</div><div> inputs = [ComplexInput('raster','Raster input',[Format('GEOTIFF')])]</div><div><br></div><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><div><br></div><div> def _handler(self, request, response):</div><div><br></div><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><div><br></div><div>The error that I recive is this one:</div><div><br></div><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><div><br></div></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>