Python Forum
[Tkinter] local variable 'doc' referenced before assignment
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] local variable 'doc' referenced before assignment
#4
As I stated:
Quote:None may cause an error if this happens, but at least you will know why.
And that's exactly what is happening here.
The new error is telling you that doc has never been assigned a value, so none of the conditionals are being called:
In other words, certificate is not equal to 'Audit_ESS' or 'IFRS_ESS'
add this statement after line 28:
print(f"certificate: {certificate}")
Reply


Messages In This Thread
RE: local variable 'doc' referenced before assignment - by Larz60+ - Oct-02-2019, 06:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Call local variable of previous function from another function with Python3 & tkinter Hannibal 5 4,477 Oct-12-2020, 09:16 PM
Last Post: deanhystad
  [PyQt] Create exe file including referenced image (*.png) files mart79 0 1,649 Jul-21-2020, 09:49 AM
Last Post: mart79

Forum Jump:

User Panel Messages

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