My web app seems to be breaking when I import a custom module. I think this has something to do with the python system path. For some reason, it can't find my file containing my API keys. I've read various threads about similar problems. However, I haven't been able to determine what is necessary to correct this. While my original version of the code works on my machine if I download my code from GitHub and try to run that version I get a similar error. I've researched the python system path but I feel as if I'm overlooking something. Any help is appreciated thanks.
2018-04-05 20:45:59,050: Error running WSGI application
2018-04-05 20:45:59,058: FileNotFoundError: [Errno 2] No such file or directory: 'api_file.txt'
2018-04-05 20:45:59,058: File "/var/www/gcmatt_pythonanywhere_com_wsgi.py", line 81, in <module>
2018-04-05 20:45:59,058: from src.app import app as application # noqa
2018-04-05 20:45:59,058:
2018-04-05 20:45:59,058: File "/home/gcmatt/capstone/src/app.py", line 3, in <module>
2018-04-05 20:45:59,058: from src.models.search import Search
2018-04-05 20:45:59,059:
2018-04-05 20:45:59,059: File "/home/gcmatt/capstone/src/models/search.py", line 6, in <module>
2018-04-05 20:45:59,059: with open(api_file, 'r') as file:
[edit by admin: formatting]