Python Forum
Keep getting "invalid syntax error"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keep getting "invalid syntax error"
#1
when running the following code
export SPOTIPY_CLIENT_ID = 'client id'
I get the error "SyntaxError: invalid syntax". The same error is happening with other packages i install as well.

I've been researching what's causing this for a while but i just can't figure out what simple thing I'm doing wrong.

Any help or guidance is appreciated.
Reply
#2
Where did you find this export command? It is not Python as far as I know. It looks like a Unix shell command, but then there should be no spaces.
Reply
#3
this is not python code. It looks like export command on Linux to create environmental variable SPOTIPY_CLIENT_ID with specific value.
https://stackoverflow.com/questions/1379...command-do

Probably that's part of the installation instructions of whatever script/package you try to run/install
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#4
What do you expect to achieve with this command?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Syntax error for "root = Tk()" dlwaddel 15 1,160 Jan-29-2024, 12:07 AM
Last Post: dlwaddel
Photo SYNTAX ERROR Yannko 3 373 Jan-19-2024, 01:20 PM
Last Post: rob101
  error: invalid command 'egg_info' TimTu 0 950 Jul-27-2023, 07:30 AM
Last Post: TimTu
  Syntax error while executing the Python code in Linux DivAsh 8 1,544 Jul-19-2023, 06:27 PM
Last Post: Lahearle
  Code is returning the incorrect values. syntax error 007sonic 6 1,206 Jun-19-2023, 03:35 AM
Last Post: 007sonic
  print(data) is suddenly invalid syntax db042190 6 1,183 Jun-14-2023, 02:55 PM
Last Post: deanhystad
  syntax error question - string mgallotti 5 1,296 Feb-03-2023, 05:10 PM
Last Post: mgallotti
  Syntax error? I don't see it KenHorse 4 1,241 Jan-15-2023, 07:49 PM
Last Post: Gribouillis
  [ERROR] ParamValidationError: Parameter validation failed: Invalid type for parameter gdbengo 3 10,971 Dec-26-2022, 08:48 AM
Last Post: ibreeden
  Syntax error tibbj001 2 881 Dec-05-2022, 06:38 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020