it’s using a dictionary and can’t find the key for your local host.
this is probably causing the error breaking:
ip_hash={}; # the dictionary is made
and
ip_hash[ip] = 1; # the dictionary is incorrectly accessed
this part alone isn’t a good idea:
if ip in ip_hash:
print " repeat " + ip;
else:
ip_hash[ip] = 1;
2
solved python with tor and reddit “KeyError” [closed]