Closed gamerswift13 closed 6 years ago
@gamerswift13, is your file in your repo named "local_settings (copy).txt"? If so, that's probably the problem. It's looking specifically for a file named "local_settings.py" If you rename it and commit it and push it back to heroku, it should fix that issue. Let me know if that helps.
No, I had to copy the file because github wouldn’t let me upload a .py file and I just forgot to remove the (copy) part from the filename. someone I spoke to on Mastodon pointed out that local_settings.py is named in gitignore but I haven’t had a chance to verify that myself yet.
EDIT: I've double-checked my older bot made using your code from February and the .gitignore there doesn't include local_settings.py, but removing that line from .gitignore in my current bot doesn't make any difference - I'm still seeing ModuleNotFoundError.
@gamerswift13 In the heroku app, can you do the following:
Do you see local_settings.py?
Oops! No it wasn't there! But after removing the filename from .gitignore and then adding local_settings.py manually and pushing it, it works fine. Sorry for bothering you with something so basic but thank you so much for your help! I definitely don't think I would have got there on my own.
I have set up this bot successfully once, in February this year using Twitter but I am now running into problems using it for Mastodon, but I don't think the problem is with either service.
I have followed all the steps described multiple times but I keep getting the following error when trying the first
heroku run worker
command:I've definitely got the correct file name etc and I've tried changing the runtime.txt several different versions of Python to see if it makes any difference but it doesn't? Have attached my local_settings.py file in case there's something obvious that I've somehow missed. For the record I am very new to coding so I apologise if I'm just wasting your time with a mistake I've made.
local_settings (copy).txt