Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Pythonista Flask Error [Errno 1]
-
Hello , I keep receiving "[Errno 1] Operation not permitted "with the most basic code for flask.
the code is:from flask import Flask Flaskapp = Flask(__name__) @Flaskapp.route('/') def helloWorld(): return 'Woala' Flaskapp.run(debug=True)
and the error is:
* Serving Flask app "app" (lazy loading) * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Debug mode: on * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) * Restarting with stat Traceback (most recent call last): File "/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/app.py", line 9, in <module> Flaskapp.run(debug=True) File "/private/var/mobile/Containers/Shared/AppGroup/C4F03A05-D634-4F19-865F-6072E8D6DC38/Pythonista3/Documents/site-packages-3/flask/app.py", line 990, in run run_simple(host, port, self, **options) File "/private/var/mobile/Containers/Shared/AppGroup/C4F03A05-D634-4F19-865F-6072E8D6DC38/Pythonista3/Documents/site-packages-3/werkzeug/serving.py", line 1007, in run_simple run_with_reloader(inner, extra_files, reloader_interval, reloader_type) File "/private/var/mobile/Containers/Shared/AppGroup/C4F03A05-D634-4F19-865F-6072E8D6DC38/Pythonista3/Documents/site-packages-3/werkzeug/_reloader.py", line 332, in run_with_reloader sys.exit(reloader.restart_with_reloader()) File "/private/var/mobile/Containers/Shared/AppGroup/C4F03A05-D634-4F19-865F-6072E8D6DC38/Pythonista3/Documents/site-packages-3/werkzeug/_reloader.py", line 176, in restart_with_reloader exit_code = subprocess.call(args, env=new_environ, close_fds=False) File "/var/containers/Bundle/Application/E373BC34-F149-4EF5-9D0E-5CD807AB0771/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/subprocess.py", line 268, in call with Popen(*popenargs, **kwargs) as p: File "/var/containers/Bundle/Application/E373BC34-F149-4EF5-9D0E-5CD807AB0771/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/subprocess.py", line 708, in __init__ restore_signals, start_new_session) File "/var/containers/Bundle/Application/E373BC34-F149-4EF5-9D0E-5CD807AB0771/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/subprocess.py", line 1261, in _execute_child restore_signals, start_new_session, preexec_fn) PermissionError: [Errno 1] Operation not permitted
Please help
-
Reboot Pythonista or reboot your device.
-
The only way to use debug is:
if __name__ == '__main__': app.run(use_reloader=False, debug=True)
-
Rebooting didn't help, but augusto’s advice works perfectly ! Thank you ! :)