[Pywps-dev] Sending GML as data input
Marcel Wolters - Periplus Group
m.wolters at periplus.nl
Mon Jul 4 07:44:22 PDT 2016
Hi list,
I set up PyWPS-4 and the pywps-demo on an Ubuntu 16.04 server.
But I can't figure out how to send a GML as input.
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
http://localhost:5001/wps?service=wps&version=1.0.0&request=execute&identifier=feature_count&datainputs=layer=localhost/wps/point.gml
The server gives this error message:
<type 'collections.deque'>
Traceback (most recent call last):
File "/home/marcel/src/pywps/pywps/app/Process.py", line 233, in _run_process
wps_response = self.handler(wps_request, wps_response)
File "/home/marcel/pywps-demo/processes/feature_count.py", line 27, in _handler
doc = lxml.etree.parse(request.inputs['layer'].file)
AttributeError: 'collections.deque' object has no attribute 'file'
ERROR:pywps.app.Process:Process error: feature_count.py._handler Line 27 'collections.deque' object has no attribute 'file'
ERROR:pywps.exceptions:Exception: code: 400, locator: Service error: near "collections": syntax error, description:
Traceback (most recent call last):
File "/home/marcel/src/pywps/pywps/app/Service.py", line 365, in _parse_and_execute
wps_response = process.execute(wps_request, uuid)
File "/home/marcel/src/pywps/pywps/app/Process.py", line 159, in execute
wps_response = self._execute_process(async, wps_request, wps_response)
File "/home/marcel/src/pywps/pywps/app/Process.py", line 203, in _execute_process
wps_response = self._run_process(wps_request, wps_response)
File "/home/marcel/src/pywps/pywps/app/Process.py", line 266, in _run_process
wps_response.update_status(msg, -1)
File "/home/marcel/src/pywps/pywps/app/WPSResponse.py", line 56, in update_status
update_response(self.uuid, self)
File "/home/marcel/src/pywps/pywps/dblog.py", line 113, in update_response
cur.execute(update)
OperationalError: near "collections": syntax error
When I try to send the GML using the HTTP POST method, the server gives this message:
ERROR:pywps.exceptions:Exception: code: 400, locator: Start tag expected, '<' not found, line 1, column 1, description:
Traceback (most recent call last):
File "/home/marcel/src/pywps/pywps/app/WPSRequest.py", line 80, in _post_request
doc = lxml.etree.fromstring(self.http_request.get_data())
File "src/lxml/lxml.etree.pyx", line 3213, in lxml.etree.fromstring (src/lxml/lxml.etree.c:77697)
File "src/lxml/parser.pxi", line 1819, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:116494)
File "src/lxml/parser.pxi", line 1707, in lxml.etree._parseDoc (src/lxml/lxml.etree.c:115144)
File "src/lxml/parser.pxi", line 1079, in lxml.etree._BaseParser._parseDoc (src/lxml/lxml.etree.c:109543)
File "src/lxml/parser.pxi", line 573, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:103404)
File "src/lxml/parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:105058)
File "src/lxml/parser.pxi", line 613, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:103967)
XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1
So, what am I doing wrong?
With kind regards,
Marcel Wolters
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pywps-dev/attachments/20160704/46effeb6/attachment.html>
More information about the pywps-dev
mailing list