Closed feeds closed 6 years ago
➜ InformatiCup2018 git:(web-app) ✗ export FLASK_APP="src/serving/api.py"
➜ InformatiCup2018 git:(web-app) ✗ flask run --host=0.0.0.0
Traceback (most recent call last):
File "/usr/local/bin/flask", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 513, in main
cli.main(args=args, prog_name=name)
File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 380, in main
return AppGroup.main(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 423, in run_command
app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 152, in __init__
self._load_unlocked()
File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 176, in _load_unlocked
self._app = rv = self.loader()
File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 237, in load_app
rv = locate_app(self.app_import_path)
File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 90, in locate_app
__import__(module)
File "/home/madness/Documents/Projects/InformatiCup2018/src/serving/api.py", line 134
return print(
^
SyntaxError: invalid syntax
:cry:
@WGierke du könntest die File jetzt wie in der main beschrieben als flask server sarten und in der web app mit den gegebenen Variablen callen :)