<html><body><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;" data-mce-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><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;" data-mce-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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #fdfdfd;" data-mce-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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 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;" data-mce-style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;"><br data-mce-bogus="1"></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;" data-mce-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;" data-mce-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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: #fdfdfd;" data-mce-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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 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;" data-mce-style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;"><br data-mce-bogus="1"></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;" data-mce-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;" data-mce-style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;">Jonas</div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;" data-mce-style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: #000000;"><br><span id="zwchr" data-marker="__DIVIDER__">----- Am 10. Jun 2016 um 10:13 schrieb Jachym Cepicky <jachym.cepicky@gmail.com>:<br></span><div data-marker="__QUOTED_TEXT__"><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;" data-mce-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;" data-mce-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;" data-mce-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>pywps-dev@lists.osgeo.org<br>http://lists.osgeo.org/mailman/listinfo/pywps-dev</blockquote></div></div><br></div></body></html>