Getting this error when running python manage.py sync_livestreams on the server.
Traceback (most recent call last):
File "/home/hon/hon.pythonanywhere.com/manage.py", line 22, in <module>
main()
File "/home/hon/hon.pythonanywhere.com/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/hon/.virtualenvs/hon.pythonanywhere.com/lib/python3.8/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/home/hon/.virtualenvs/hon.pythonanywhere.com/lib/python3.8/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/hon/.virtualenvs/hon.pythonanywhere.com/lib/python3.8/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/hon/.virtualenvs/hon.pythonanywhere.com/lib/python3.8/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/home/hon/hon.pythonanywhere.com/alwayssunriseapp/management/commands/sync_livestreams.py", line 17, in handle
livestream.sunrise_time_today = get_sunrise_times(
File "/home/hon/hon.pythonanywhere.com/alwayssunriseapp/utils/api_retrievals.py", line 49, in get_sunrise_times
response.json()["results"]["sunrise"], "%I:%M:%S %p"
KeyError: 'results'
Getting this error when running
python manage.py sync_livestreams
on the server.