1👍
✅
This os.path.dirname(__file__)
is giving you a relative path. On your local server, it just happens that it corresponds to the correct path. On PythonAnywhere, use the full path for module_dir
. Like this: os.path.abspath(os.path.dirname(__file__))
Source:stackexchange.com