Vladimir
Vladimir

Reputation: 145

Flask app is not start over twisted 16.4.X as wsgi

I have simple Flask app test.py:

from flask import Flask

app = Flask(__name__)

@app.route('/')
def test():
    return 'Hello world!'

if __name__ == '__main__':
    app.run()

Run over twisted 16.3.0 work fine:

twistd -n web --port 5000 --wsgi test.app

After upgrade twisted to 16.4.0 i have got error on start:

No such WSGI application: 'test.app'

What is mean?

Upvotes: 2

Views: 1496

Answers (1)

Graham Dumpleton
Graham Dumpleton

Reputation: 58563

Your are likely picking up the test module which is part of the Python standard library. Rename your code file (module) to something else. You also may need to set PYTHONPATH so it looks in the directory where code module is.

Upvotes: 1

Related Questions