Skip to content

Could not run on apache with mod_wsgi #106

@ryuzee

Description

@ryuzee

Hi!

graph-explorer works fine for me with built-in httpd server but when I tried to run it on apache with mod_wsgi, I got these errors as follows.
How can I fix the errors?

Traceback (most recent call last):
File "/var/www/graph_explorer/app.wsgi", line 5, in <module>
     import bottle, app
   File "/var/www/graph_explorer/app.py", line 8, in <module>
     from graphs import Graphs
   File "/var/www/graph_explorer/graphs/__init__.py", line 3, in <module>
     from ..structured_metrics import PluginError
 ValueError: Attempted relative import beyond toplevel package

My configuration of mod_wsgi and the new script are as follows.

WSGIDaemonProcess graph_explorer user=www-data group=www-data processes=1 threads=5
WSGIScriptAlias / /var/www/graph_explorer/app.wsgi

<Directory /var/www/graph_explorer>
        WSGIProcessGroup graph_explorer
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
</Directory>

app.wsgi

import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import bottle, app
application = bottle.default_app()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions