Hello. I'm having bad time dealing with this error.
Log from apache:
[Tue Apr 08 11:31:54 2014] [error] [client 127.0.0.1] mod_wsgi (pid=6964): Target WSGI script '/var/www/server/run.wsgi' cannot be loaded as Python module., referer:
http://localhost/a/
[Tue Apr 08 11:31:54 2014] [error] [client 127.0.0.1] mod_wsgi (pid=6964): Exception occurred processing WSGI script '/var/www/server/run.wsgi'., referer:
http://localhost/a/
[Tue Apr 08 11:31:54 2014] [error] [client 127.0.0.1] Traceback (most recent call last):, referer:
http://localhost/a/
[Tue Apr 08 11:31:54 2014] [error] [client 127.0.0.1] File "/var/www/server/run.wsgi", line 4, in <module>, referer:
http://localhost/a/
[Tue Apr 08 11:31:54 2014] [error] [client 127.0.0.1] from abcserver import app as application, referer:
http://localhost/a/
[Tue Apr 08 11:31:54 2014] [error] [client 127.0.0.1] File "/var/www/server/abcserver/__init__.py", line 17, in <module>, referer:
http://localhost/pb5/a/
[Tue Apr 08 11:31:54 2014] [error] [client 127.0.0.1] import abcserver.modules.vi, referer:
http://localhost/a/
[Tue Apr 08 11:31:54 2014] [error] [client 127.0.0.1] ImportError: No module named modules.vi, referer:
http://localhost/a/
I use python and wsgi and have no clue how to set things right.
If any other file needed please say.
__init__.py:
#!/usr/bin/env python
from flask import Flask, send_file
from flask_mail import Mail
app = Flask(__name__)
app.config.from_object('abcserver.config.dev')
mail = Mail(app)
import abcserver.modules.vi
#this is error line
run.wsgi:
import sys
sys.path.insert(0, '/var/www/server')
from abcserver import app as application