I am trying to get flask running on my server, This is the code I’m running
#!/usr/bin/python3
import sys, os
INTERP = “/home/username/sub.domain.com/bin/python”
if sys.executable != INTERP:
os.execl(INTERP, INTERP, *sys.argv)
sys.path.append(os.getcwd())from flask import Flask
application = Flask(name)@application.route(’/’)
def index():
return ‘Hello from Passenger’
And I am getting this error.
Traceback (most recent call last): File "/usr/share/passenger/helper-scripts/wsgi-loader.py", line 325, in <module> app_module = load_app() File "/usr/share/passenger/helper-scripts/wsgi-loader.py", line 62, in load_app return imp.load_source('passenger_wsgi', startup_file) NameError: global name 'imp' is not defined
Does this mean there is something wrong internally?