<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.CodeChar
        {mso-style-name:"Code Char";
        mso-style-link:Code;
        font-family:"Courier New";
        mso-fareast-language:NL;}
p.Code, li.Code, div.Code
        {mso-style-name:Code;
        mso-style-link:"Code Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NL" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi list,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-GB">I set up PyWPS-4 and the pywps-demo on an Ubuntu 16.04 server.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">But I can’t figure out how to send a GML as input.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">When I send the url to the GML file as parameter in the WPS request when calling the feature_count demo process (or the centroids demo process), like this<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:"Courier New";color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">http://localhost:5001/wps?service=wps&version=1.0.0&request=execute&identifier=feature_count&datainputs=layer=localhost/wps/point.gml<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">The server gives this error message:<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%"><type 'collections.deque'><o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">Traceback (most recent call last):<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "/home/marcel/src/pywps/pywps/app/Process.py", line 233, in _run_process<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">    wps_response = self.handler(wps_request, wps_response)<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "/home/marcel/pywps-demo/processes/feature_count.py", line 27, in _handler<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">    doc = lxml.etree.parse(request.inputs['layer'].file)<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">AttributeError: 'collections.deque' object has no attribute 'file'<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">ERROR:pywps.app.Process:Process error: feature_count.py._handler Line 27 'collections.deque' object has no attribute 'file'<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">ERROR:pywps.exceptions:Exception: code: 400, locator: Service error: near "collections": syntax error, description:<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">Traceback (most recent call last):<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "/home/marcel/src/pywps/pywps/app/Service.py", line 365, in _parse_and_execute<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">    wps_response = process.execute(wps_request, uuid)<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "/home/marcel/src/pywps/pywps/app/Process.py", line 159, in execute<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">    wps_response = self._execute_process(async, wps_request, wps_response)<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "/home/marcel/src/pywps/pywps/app/Process.py", line 203, in _execute_process<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">    wps_response = self._run_process(wps_request, wps_response)<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "/home/marcel/src/pywps/pywps/app/Process.py", line 266, in _run_process<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">    wps_response.update_status(msg, -1)<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "/home/marcel/src/pywps/pywps/app/WPSResponse.py", line 56, in update_status<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">    update_response(self.uuid, self)<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "/home/marcel/src/pywps/pywps/dblog.py", line 113, in update_response<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">    cur.execute(update)<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">OperationalError: near "collections": syntax error</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">When I try to send the GML using the HTTP POST method, the server gives this message:<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">ERROR:pywps.exceptions:Exception: code: 400, locator: Start tag expected, '<' not found, line 1, column 1, description:<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">Traceback (most recent call last):<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "/home/marcel/src/pywps/pywps/app/WPSRequest.py", line 80, in _post_request<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">   
</span><span lang="DE" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">doc = lxml.etree.fromstring(self.http_request.get_data())<o:p></o:p></span></p>
<p class="Code"><span lang="DE" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "src/lxml/lxml.etree.pyx", line 3213, in lxml.etree.fromstring (src/lxml/lxml.etree.c:77697)<o:p></o:p></span></p>
<p class="Code"><span lang="DE" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "src/lxml/parser.pxi", line 1819, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:116494)<o:p></o:p></span></p>
<p class="Code"><span lang="DE" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "src/lxml/parser.pxi", line 1707, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:115144)<o:p></o:p></span></p>
<p class="Code"><span lang="DE" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "src/lxml/parser.pxi", line 1079, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:109543)<o:p></o:p></span></p>
<p class="Code"><span lang="DE" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "src/lxml/parser.pxi", line 573, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:103404)<o:p></o:p></span></p>
<p class="Code"><span lang="DE" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "src/lxml/parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:105058)<o:p></o:p></span></p>
<p class="Code"><span lang="DE" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">  File "src/lxml/parser.pxi", line 613, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:103967)<o:p></o:p></span></p>
<p class="Code"><span lang="EN-GB" style="color:#595959;mso-style-textfill-fill-color:#595959;mso-style-textfill-fill-alpha:100.0%">XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">So, what am I doing wrong?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:NL">With kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:NL">Marcel Wolters<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
</body>
</html>