Python Forum
Syntax Error Invalid Syntax / ghost Variable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syntax Error Invalid Syntax / ghost Variable
#1
Hi i'm begginer in Python Language and for this problem i don't success to found the solution to stop that
Someone have a Solution ?

[Image: 703dd17866]
Reply
#2
Because the compiler depends on the structure of the program to determine what is valid and is not valid, sometimes errors earlier in the program can make a later line be detected as an error.

If the line it is whining about looks correct, look closely at the previous lines. Often you may have an error there like not having a closing quote or a closing bracket.
Reply
#3
Ah that's practical, anyway thank you for the information it will be very useful later and it allowed me to find the missing paranthesis 2 line above / problem solved
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Syntax error for "root = Tk()" dlwaddel 15 1,224 Jan-29-2024, 12:07 AM
Last Post: dlwaddel
Photo SYNTAX ERROR Yannko 3 403 Jan-19-2024, 01:20 PM
Last Post: rob101
  Basic syntax zenkalidas 2 378 Jan-17-2024, 10:17 PM
Last Post: deanhystad
  I'm looking for the syntax of a complex exponent, like: 2 ** (n - m) CHANCEMAN 2 564 Dec-29-2023, 01:53 PM
Last Post: Yoriz
  error: invalid command 'egg_info' TimTu 0 966 Jul-27-2023, 07:30 AM
Last Post: TimTu
  Syntax error while executing the Python code in Linux DivAsh 8 1,639 Jul-19-2023, 06:27 PM
Last Post: Lahearle
  Code is returning the incorrect values. syntax error 007sonic 6 1,244 Jun-19-2023, 03:35 AM
Last Post: 007sonic
  print(data) is suddenly invalid syntax db042190 6 1,216 Jun-14-2023, 02:55 PM
Last Post: deanhystad
  Curious about decorator syntax rjdegraff42 14 2,150 May-03-2023, 01:21 PM
Last Post: rjdegraff42
  python dictionary syntax nafshar 2 888 Apr-24-2023, 07:26 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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