r/pythonhelp • • Feb 15 '21

Cannot figure out invalid syntax error.

Im currently making a discord bot that pulls data from yahoo_fin api and posts the data in the channel. I cannot figure out why the code is giving me an error on line 23, start = 0. Can someone help me?

2 Upvotes

8 comments sorted by

View all comments

1

u/someoneonboard1 Feb 15 '21

Whats the use of “{“ and “}”? Remove colon after start=0. while True: should line up with start=0. Learn indentation.

1

u/nick4wow Feb 15 '21

When i allign {} and allign while True: it says the while true is invalid syntax.

And the use of {} was because of i want to have the bot send the while true to the channel but i dont know how to attach the while true to the await.message.channel.send()...

Im still new and learning how to program so obviously im going to have some simple issues that i dont see but others notice