I have a very frustrating python problem. In this code
fixedKeyStringInAVar = "SomeKey"
def myFunc(a, b):
global sleepTime
global fixedKeyStringInAVar
varMe=int("15")
sleepTime[fixedKeyStringInAVar] = varMe*60*1000
#more code
Now this works. BUT sometimes when i run this fuction i get
TypeError: 'int' object does not support item assignment
It is extremely annoying since i trid several test cases and could not reproduce the error, yet it happens very often when i run the full code. The code reads data from a db, access sites, etc so its hard for me to go through the data since it reads from several sources and depends on 3rd party input that changes (websites).
What could this error be?