astrictly
astrictly

Reputation: 1

I'm receiving an error in my bots code.. idk what to do

So basically, I took my time to make a discord.py bot (I think the the version is 1.5.0 or 1.5.6) and I went to Heroku where everything was working fine. But then got this error

" File "/app/lib/db/db.py", line 42
if (fetch := cur.fetchone()) is not None:
          ^
SyntaxError: invalid syntax"

But everything was working OK locally. what did I do wrong? I checked the error and went back on the tutorial I was following and what I wrote is good, there's no typo.

Upvotes: 0

Views: 78

Answers (1)

Keven Li
Keven Li

Reputation: 634

This is new grammar in python3.8,

Edit your runtime.txt to config using python 3.8.

python-3.8.6

https://devcenter.heroku.com/articles/python-support#supported-runtimes

Upvotes: 1

Related Questions