This is my first time writing in this platform. I got an error on my RPi when hosting a discord music bot using lavalink. Currently, my problem is that there's a invalid syntax error on a line of code. The weird part is that I don't get this error when I use VSCode on Windows 10. It also ran perfect in Win 10. I've tried to install the required packages, tried to search up what could be the problem. I found no results. I was wondering what could be my main issue over here.
Main src code:
if (currentTrackData := player.fetch("currentTrackData")) != None:
embed.set_thumbnail(url=currentTrackData["thumbnail"]["genius"])
embed.description += f"\n[LYRICS]({currentTrackData['links']['genius']}) | [ARTIST](https://genius.com/artists/{currentTrackData['author'].replace(' ', '%20')})"
Console Error:
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 606, in _load_from_module_spec
spec.loader.exec_module(lib)
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 860, in get_code
File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/pi/SpotBot/cogs/Music.py", line 168
if (currentTrackData := player.fetch("currentTrackData")) != None:
^
SyntaxError: invalid syntax
Not to mention my RPi is running Raspbian x64.