i just moved from bottleframework to flask. I changes what needed to be altered to convert the code and when i run it i just get "Internal server error" Running tail -f ../logs/error_log i get no errors. How can i find out what is the culprit here?
vergos....@gmail.com
vergos.nikolas at gmail.com
Thu Jul 8 09:42:48 EDT 2021
i just moved from bottleframework to flask. I changes what needed to be altered to convert the code and when i run it i just get "Internal server error"
Running tail -f ../logs/error_log i get no errors.
How can i find out what is the culprit here?
[nikos at superhost wsgi]$ export FLASK_APP=www.py
[nikos at superhost wsgi]$ export FLASK_ENV=development
[nikos at superhost wsgi]$ flask run
* Serving Flask app 'www.py' (lazy loading)
* Environment: development
* Debug mode: on
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.
Error: While importing 'www', an ImportError was raised:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 256, in locate_app
__import__(module_name)
File "/home/nikos/wsgi/www.py", line 4, in <module>
import counters
File "/home/nikos/wsgi/counters.py", line 6, in <module>
from flask import run, route, request, redirect
ImportError: cannot import name 'run'
and this is the error_log when tries to be displayed via browser:
[Thu Jul 08 15:08:36.436195 2021] [wsgi:error] [pid 575443:tid 139757752112896] [remote 89.210.199.119:6718] mod_wsgi (pid=575443): Failed to exec Python script file '/home/nikos/wsgi/www.py'.
[Thu Jul 08 15:08:36.436276 2021] [wsgi:error] [pid 575443:tid 139757752112896] [remote 89.210.199.119:6718] mod_wsgi (pid=575443): Exception occurred processing WSGI script '/home/nikos/wsgi/www.py'.
[Thu Jul 08 15:08:36.436408 2021] [wsgi:error] [pid 575443:tid 139757752112896] [remote 89.210.199.119:6718] Traceback (most recent call last):
[Thu Jul 08 15:08:36.436432 2021] [wsgi:error] [pid 575443:tid 139757752112896] [remote 89.210.199.119:6718] File "/home/nikos/wsgi/www.py", line 4, in <module>
[Thu Jul 08 15:08:36.436436 2021] [wsgi:error] [pid 575443:tid 139757752112896] [remote 89.210.199.119:6718] import counters
[Thu Jul 08 15:08:36.436441 2021] [wsgi:error] [pid 575443:tid 139757752112896] [remote 89.210.199.119:6718] File "/home/nikos/wsgi/counters.py", line 6, in <module>
[Thu Jul 08 15:08:36.436444 2021] [wsgi:error] [pid 575443:tid 139757752112896] [remote 89.210.199.119:6718] from flask import run, route, request, redirect
[Thu Jul 08 15:08:36.436458 2021] [wsgi:error] [pid 575443:tid 139757752112896] [remote 89.210.199.119:6718] ImportError: cannot import name 'run'
[Thu Jul 08 15:08:40.075655 2021] [wsgi:error] [pid 575443:tid 139757777291008] [remote 89.210.199.119:13389] mod_wsgi (pid=575443): Failed to exec Python script file '/home/nikos/wsgi/www.py'.
[Thu Jul 08 15:08:40.075703 2021] [wsgi:error] [pid 575443:tid 139757777291008] [remote 89.210.199.119:13389] mod_wsgi (pid=575443): Exception occurred processing WSGI script '/home/nikos/wsgi/www.py'.
[Thu Jul 08 15:08:40.075785 2021] [wsgi:error] [pid 575443:tid 139757777291008] [remote 89.210.199.119:13389] Traceback (most recent call last):
[Thu Jul 08 15:08:40.075802 2021] [wsgi:error] [pid 575443:tid 139757777291008] [remote 89.210.199.119:13389] File "/home/nikos/wsgi/www.py", line 4, in <module>
[Thu Jul 08 15:08:40.075805 2021] [wsgi:error] [pid 575443:tid 139757777291008] [remote 89.210.199.119:13389] import counters
[Thu Jul 08 15:08:40.075810 2021] [wsgi:error] [pid 575443:tid 139757777291008] [remote 89.210.199.119:13389] File "/home/nikos/wsgi/counters.py", line 6, in <module>
[Thu Jul 08 15:08:40.075813 2021] [wsgi:error] [pid 575443:tid 139757777291008] [remote 89.210.199.119:13389] from flask import run, route, request, redirect
[Thu Jul 08 15:08:40.075825 2021] [wsgi:error] [pid 575443:tid 139757777291008] [remote 89.210.199.119:13389] ImportError: cannot import name 'run'
More information about the Python-list
mailing list