0

mod_wsgi を使用して Apache の背後で BottlePy を使用しようとしています。

app.wsgi:

#!/usr/bin/python27
from bottle import route, default_app
from wbem.models import Host

@route('/')
def index():
    return "Home Page"

os.chdir(os.path.dirname(__file__))
application = default_app()

ただし、次のエラーが発生するようです。

mod_wsgi (pid=8850): Target WSGI script '/u/apps/wbem/app.wsgi' cannot be loaded as     Python module.
[Wed Oct 30 09:35:17 2013] [error] [client 10.10.65.19] mod_wsgi (pid=8850): Exception   occurred processing WSGI script '/u/apps/wbem/app.wsgi'.
[Wed Oct 30 09:35:17 2013] [error] [client 10.10.65.19] Traceback (most recent call last):
[Wed Oct 30 09:35:17 2013] [error] [client 10.10.65.19]   File "/u/apps/wbem/app.wsgi", line 2, in ?
[Wed Oct 30 09:35:17 2013] [error] [client 10.10.65.19]     from bottle import route, default_app
[Wed Oct 30 09:35:17 2013] [error] [client 10.10.65.19]   File "/usr/local/lib/python2.7/site-packages/bottle.py", line 113
[Wed Oct 30 09:35:17 2013] [error] [client 10.10.65.19]      return s.encode(enc) if isinstance(s, unicode) else bytes(s)
[Wed Oct 30 09:35:17 2013] [error] [client 10.10.65.19]                            ^
[Wed Oct 30 09:35:17 2013] [error] [client 10.10.65.19]  SyntaxError: invalid syntax

一部の教祖が光を当てることができれば、感謝します:)

4

1 に答える 1