Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for deviceInDic in devicesDic:
- RuntimeError: dictionary changed size during iteration
- devicesDic = {'duck_waxer' : 0}
- x = int(0)
- #y = x
- y = True
- while y == True:
- try:
- jdata = data["result"]["items"][0]["tagValues"]["IdDevicesMap"]["value"]
- for device in jdata.values():
- for deviceInDic in devicesDic:
- if deviceInDic == device:
- devicesDic[device] += 1
- else:
- print 'else'
- devicesDic[device] = 1
- except KeyError:
- #noValues += 1
- pass
- except IndexError:
- break
- print devicesDic
- y = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement