FR: lancement en web local ?
Sur Freebsd 11.3
J'ai installé les ports suivants:
- pkg install python
- pkg install math/py-numpy
- pkg install print/py-reportlab
- pkg install www/py-flask
- pkg install devel/py-defusedxml
- pkg install textproc/py-xlrd
- pkg install www/py-gunicorn
Dans le répetoire initial (CHANGELOG.md,...setup.py) qui est /ABC/ember-factory j'ai créé le fichier emberfactory.cfg contenant l'unique ligne
APPLICATION_ROOT=/ABC/ember-factory
Je lance (par exemple en local 8010)
gunicorn -w 1 --bind 127.0.0.1:8010 emberweb:create_app
j'ai une sortie du type
- [INFO] Starting gunicorn 19.9.0
- [INFO] Listening at: http://127.0.0.1:8010 (50594)
- [INFO] Using worker: sync
- [INFO] Booting worker with pid: 50596
Avec
lynx 127.0.0.1:8010
j'ai une erreur "Internal Server Error"
gunicorn me rend l'erreur:
[ERROR] Error handling request / Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 135, in handle self.handle_request(listener, req, client, addr) File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/sync.py", line 176, in handle_request respiter = self.wsgi(environ, resp.start_response) TypeError: create_app() takes from 0 to 1 positional arguments but 2 were given
Une idée ?
Bàt Roll