Python Forum
traceback reports "wrong" file and line
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
traceback reports "wrong" file and line
#1
technically, it's correct, but useless:
Output:
lt2a/forums /home/forums 5> cat foo.py a=1 b=2 c=3 d=f'hello {world{}}' lt2a/forums /home/forums 6> python3.6 foo.py File "<fstring>", line 1 (world{}) ^ SyntaxError: invalid syntax lt2a/forums /home/forums 7>
in a big script with lots of similar messages, you won't know which line the error in the f-string is at. did they get this fixed in 3.6.9 or 3.7 or 3.8?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
traceback reports "wrong" file and line - by Skaperen - Nov-20-2019, 07:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb traceback and multi-line statement Skaperen 0 892 Jan-31-2023, 12:23 AM
Last Post: Skaperen
  a program i want: file line slicing Skaperen 4 3,323 Dec-19-2018, 01:47 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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