Closed VickiLanger closed 3 years ago
283
Still getting an error. I'm sure it's a quick fix.
2020-11-30T16:31:01.915475+00:00 app[scheduler.9307]: Traceback (most recent call last):
2020-11-30T16:31:01.915517+00:00 app[scheduler.9307]: File "tweet_annual_days.py", line 63, in <module>
2020-11-30T16:31:01.915727+00:00 app[scheduler.9307]: tweet_annual_event()
2020-11-30T16:31:01.915795+00:00 app[scheduler.9307]: File "tweet_annual_days.py", line 56, in tweet_annual_event
2020-11-30T16:31:01.916022+00:00 app[scheduler.9307]: event_tweet = tweet_template + str(list_of_event_tweets[0])
2020-11-30T16:31:01.916071+00:00 app[scheduler.9307]: IndexError: list index out of range
oh no!! I'l run some more tests here :(
https://github.com/VickiLanger/LGBTQ-of-the-day-bot/pull/286
hopefully this is the last update to get it up and running
@lhfaguiar Thank you so much for fixing it. Production is back to working properly!
Describe the bug
tweet_annual_events.py
is tweetingToday is []
(example)I added the str() to line 51 & 53 because both gave
TypeError: must be str, not list
. Weird that it gave the error though because it was working fine before that. https://github.com/VickiLanger/LGBTQ-of-the-day-bot/commit/458011e34a15f931b7ccda50558df60ed769e31a#diff-35adfeb78198446941a15787967ce372f9106ac2373e821bcb6d8a5e180456cehttps://github.com/VickiLanger/LGBTQ-of-the-day-bot/blob/3196de8a0ed16f21776506e761aae61cbd749b33/tweet_annual_days.py#L51
https://github.com/VickiLanger/LGBTQ-of-the-day-bot/blob/ca761fb4302dde69e365e6e3cc7f1ee1506e2529/tweet_annual_days.py#L53
To Reproduce Currently, running and posting as
Today is []
daily at 1130 EST/430 UTCExpected behavior It should instead be tweeting the first item of
list_of_event_tweets
. Should only tweet the first event inlist_of_event_tweets
if there is an event or print to logsno annual event tweet today
Additional context For reference, the next 3 events are
Don't forget to follow the bot on Twitter to see the hard work you put in.