[Tutor] KeyError: '184.108.40.206' with dictionary.
hugo.yoshi at gmail.com
Thu Mar 25 13:31:07 CET 2010
On Thu, Mar 25, 2010 at 12:24 PM, Ray Parrish <crp at cmc.net> wrote:
> As you can see, it is tossing a key error on the same ip address that was
> used in the interactive code successfully,
> I can not figure out what to change to make the script work. Does someone
> know why this happens?
It's impossible to tell for sure from just that snippet, but my first
guess would be that the if statement is not actually executed. Put a
print statement in there and check if you're really executing what you
think you're executing.
More information about the Tutor