I'm not sure that the problem is the one the person who answered on Stack Overflow thinks it is -- you're using Python 3.7, which has its own configparser
built in, while they're talking about an older version of configparser
which would be installed as a separate package for versions of Python older than 2.7.
If you're having a problem loading a config file that works locally, my guess is that you're not loading the file that you think you are. What path are you using to access it? If it's a relative path (for example config.cfg
or something/config.cfg
) then it will be accessed relative to the working directory of your code, which might be different on PythonAnywhere to what it is on your local machine. Try using an absolute path, like /home/jguidac/something/config.cfg
.