Python Forum
SyntaxError: unexpected EOF while parsing
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SyntaxError: unexpected EOF while parsing
#2
You used try without either except and/or finally. In general, placing large blocks of code under try clause reduce readability - you would either want to place specific line(s) that may cause exceptions under try - or arrange your code in a function and call this function under try clause
Test everything in a Python shell (iPython, Azure Notebook, etc.)
  • Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
  • Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
  • You posted a claim that something you did not test works? Be prepared to eat your hat.
Reply


Messages In This Thread
RE: SyntaxError: unexpected EOF while parsing - by volcano63 - Oct-15-2018, 04:57 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  unexpected EOF while parsing dawid294 1 531 Jan-03-2024, 04:22 PM
Last Post: deanhystad
  SyntaxError: unexpected character after line continuation character siteshkumar 2 3,352 Jul-13-2020, 07:05 PM
Last Post: snippsat
  unexpected EOF while parsing aaron92 3 3,699 Sep-11-2019, 10:01 PM
Last Post: aaron92
  unexpected EOF while parsing whatloop 3 8,810 Mar-09-2019, 06:59 PM
Last Post: whatloop
  pdb says "SyntaxError: unexpected EOF" on comment pwannh 1 3,162 Nov-29-2018, 04:17 PM
Last Post: nilamo
  unexpected output while parsing file anna 3 3,380 Apr-28-2018, 05:13 PM
Last Post: anna
  Unexpected Output after Running PArsing Script hotsea 7 5,336 Jan-10-2018, 09:55 AM
Last Post: hotsea
  SyntaxError: unexpected character after line continuation character Saka 2 18,792 Sep-26-2017, 09:34 AM
Last Post: Saka

Forum Jump:

User Panel Messages

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