Skip to content

Outdated activate_path code for venv in wsgi.py #81

@rowan04

Description

@rowan04

When recreating my dev env, I ran into some problems which ended up being caused by some lines in the wsgi file.

Image the lines above, found at https://github.com/apel/monitoring/blob/5660033c9937458fa20493f9db8dca57b64a382f/monitoring/wsgi.py#L16, seem to be very out of date and refer to an older way of activating virtual environments using virtualenv. Modern venv environments don't include the activate_this file, so it was causing errors (a 500 internal server error) when I was trying to run the django server. Removing those lines from the wsgi file fixed the issue for me locally.

https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html
https://stackoverflow.com/questions/27462582/how-can-i-activate-a-pyvenv-virtualenv-from-within-python-activate-this-py-was
GrahamDumpleton/mod_wsgi#823

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions