I have a problem running my django app on heroku. It has been deployed successfully but it has some problems finding various files.
in news.py
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
url_path = BASE_DIR + '/marketdata/news/'
which works locally but when I deploy it on heroku it says it can't find the file
Exception Value: [Errno 2] No such file or directory: '/app/artemis/static/marketdata/news/bloomberg_news.csv' Exception Location: /app/artemis/static/marketdata/news.py in save_to_csv, line 16
and this is my project structure
Any idea how this would be solved? Any tip would be greatly appreciated!
EDIT: if i check my project structure on heroku the news folder is not there at all. Does this have to do with the fact that it only has .csv files in it?
I found the solution to the issue I was having:
python manage.py collectstatic
before committing to herokuweb: gunicorn myproject.wsgi
solved my issueIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With