-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'pywps.wpsserver' #61
Comments
I was facing the same issue. Have found a local workaround with the following versions. However, now I am not sure if the tested stuff will work with the newest PyWPS; a general solution would be appreciated.
|
I am also facing the same issue! |
Same here. |
Still valid issue. What is the reason of python-flask to be broken for so long time? |
Update:
|
Also got the same problem: pywps: 4.5.2 I removed |
FYI, for anyone still encountering the issue: If you just want to use PyWPS with Flask, you do not need this repo (which is apparently just a demo, and seems defunct and overcomplicated anyway). Instead follow the standard instructions for PyWPS (perhaps in combination with the Flask instructions for WSGI apps). A fairly minimal example goes roughly like this: import flask
import pywps
class dummy(pywps.Process):
def __init__(self):
super().__init__(handler=self._handler,
identifier='dummyproc',
title='Dummy Process',
inputs=[pywps.LiteralInput('input', "Some input", data_type='string')],
outputs=[pywps.LiteralOutput('response', "Some output", data_type='string')])
def _handler(self, req, resp):
resp.outputs['response'].data = req.inputs['input'][0].data + " and foo"
service = pywps.Service([dummy()])
app = flask.Flask(__name__)
app.route('/wps', methods=['GET', 'POST'])(lambda: service)
app.run() Then, in a separate process, you can test it with something like: import owslib.wps
client = owslib.wps.WebProcessingService('http://127.0.0.1:5000/wps')
client.getcapabilities()
print(client.processes) For real applications you would use one of the pywps geometry input types. |
For testing, if you have QGIS, you can install the WPS Client (enable experimental plugins first). |
There seems to be an incompatibility between the latest versions of
pywps
(4.5.0) andpywps-flask
(master branch as of today).For what it's worth, I also tried using an earlier version of
pywps
, but that led to other dependency version conflicts.The text was updated successfully, but these errors were encountered: