Unable to invoke flask cli commands
See original GitHub issueI’m not sure if this is a bug or a feature request but trying to invoke any flask cli commands via ‘sls wsgi command’ results in an error. It would make my life much easier if there was a way to get them working.
Traceback (most recent call last): File "/var/task/wsgi.py", line 82, in handler meta.get("data", ""), shell=True, stderr=subprocess.STDOUT File "/var/lang/lib/python3.7/subprocess.py", line 395, in check_output **kwargs).stdout File "/var/lang/lib/python3.7/subprocess.py", line 487, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command 'flask' returned non-zero exit status 127.
Cheers!
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
I can't run a flask command from the terminal - Stack Overflow
I get this error when running the command: $flask db_create Error: While importing 'app', an ImportError was raised. Usage: flask [OPTIONS] ...
Read more >Command Line Interface — Flask Documentation (2.2.x)
Installing Flask installs the flask script, a Click command line interface, in your virtualenv. Executed from the terminal, this script gives access to ......
Read more >Flask-Script — Flask-Script 0.4.0 documentation
The Flask-Script extension provides support for writing external scripts in Flask. This includes running a development server, a customised Python shell, ...
Read more >Python and Flask Tutorial in Visual Studio Code
For more information, see Flask command line interface. Run the app in the debugger. Debugging gives you the opportunity to pause a running...
Read more >Automatically Load Environment Variables in Flask
Add FLASK_APP Environment Variable. Once we've done that, we can use the Flask CLI to run the app. To run the app, use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can’t seem to access any custom commands either. I can’t run any flask commands.
This is my code: https://github.com/jetbridge/sls-flask
I can run
flask init-db
just fine, but:It would really make my life easier if this worked!
@shughes-uk Yeah, command line scripts from packages, such as the
flask
command aren’t available.I’ll look into either:
PATH
as well (which will probably still break in many cases due to environment differences on lambda)