Python Forum
[Tkinter] What is the subscript error?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] What is the subscript error?
#2
when txt_2_search is not present in the dict keys, dict.get() will return default value of None. None[3] raise the exception you see.

Then there is one more problem in that line
if unit[3] == "fundamentals" or "supplementary quantities" or "derived quantities":
it will not work as you expect. see https://python-forum.io/Thread-Multiple-...or-keyword
Oshadha likes this post
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


Messages In This Thread
What is the subscript error? - by Oshadha - Jan-19-2021, 05:39 PM
RE: What is the subscript error? - by buran - Jan-19-2021, 06:05 PM
RE: What is the subscript error? - by Oshadha - Jan-19-2021, 06:23 PM
RE: What is the subscript error? - by deanhystad - Jan-19-2021, 07:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to print subscript in TEXT using Graphics Shahnaz 5 4,520 Feb-23-2018, 07:19 AM
Last Post: Shahnaz

Forum Jump:

User Panel Messages

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