Python Forum
Subtracting gives a keyerror:
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Subtracting gives a keyerror:
#3
(Oct-03-2016, 02:48 AM)Larz60+ Wrote: Please post your actual error traceback it is always very important

in addition, just before the line that the code is failing on, add print statements for
all variables that are used in the failing line.

The error is:

Traceback (most recent call last)
   File "python", line 108, in <module>
   File "python", line 92, in switch_target
KeyError: 'Number'
And the print out has been added.
Reply


Messages In This Thread
Subtracting gives a keyerror: - by xepicxmonkeyx - Oct-02-2016, 10:04 PM
RE: Subtracting gives a keyerror: - by Larz60+ - Oct-03-2016, 02:48 AM
RE: Subtracting gives a keyerror: - by xepicxmonkeyx - Oct-03-2016, 08:02 AM
RE: Subtracting gives a keyerror: - by j.crater - Oct-03-2016, 08:10 AM
RE: Subtracting gives a keyerror: - by Crimson King - Oct-03-2016, 09:00 AM
RE: Subtracting gives a keyerror: - by Larz60+ - Oct-03-2016, 11:02 AM
RE: Subtracting gives a keyerror: - by micseydel - Oct-03-2016, 04:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with subtracting values using SQLite & Python Extra 10 3,516 May-10-2022, 08:36 AM
Last Post: ibreeden
  Subtracting datetimes [index] Mark17 2 2,521 Aug-21-2021, 12:11 AM
Last Post: Larz60+
  Indexing problem while iterating list and subtracting lbtdne 2 2,160 May-14-2020, 10:19 PM
Last Post: deanhystad
  Subtracting values between two dictionaries/ floating point numbers FloppyPoppy 5 5,994 Mar-04-2019, 01:00 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