CyberPunkMetalHead / gateio-crypto-trading-bot-binance-announcements-new-coins

This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio
MIT License
1.21k stars 303 forks source link

syntaxerror but i'm on python 3.8.0? #114

Closed deviltuner closed 2 years ago

deviltuner commented 2 years ago

hello

i receive:

sudo python3 main.py File "<fstring>", line 1 (announcement_coin=) ^ SyntaxError: invalid syntax but i thionk i'm on python 3.8.0 pi@raspberrypi:~ $ python -V Python 3.8.0

please help thanks

gutster95 commented 2 years ago

You start the script with python3 but you use only python for the version info. Try to use only python to run the main.py. Could also verify that by just typing python3 into cmd and see what version is shown

deviltuner commented 2 years ago

Oh noob.... Perfect python3 not World python work... I'm si stupide sory about that 😫

Linus045 commented 2 years ago

python and python3 both point to a specific python installation in your case. You can use the where command (where python3 python) to figure out where they point to.

Both are valid to use and will start the script, you just need to be sure which python version is used. (To figure that out run python --version or python3 --version) If you use Python 3.7 the syntax error is correct since the fstring syntax '{someVar=}' was first introduced in Python 3.8. You need therefore Python version 3.8 or higher to run the bot.