keyerror - Python - Defensive programing on key errors -
I keep an error on this function and I do not know why I thought I should fix it a second time, but do not see it Why is it still a problem? The error goes away once more.
This was my first error, but I correct it.
file "running.py", line 332, run type type error: argument type 'NoneType' is not Iterable ================ ================================================== ============== 05 OUT 03:06:48: Exit Position: 1 def get_notifyees (jobdef): origNotifyeesList = jobdef ['notifyees']) or job def ['notify'] is no more [job deaf ['notibiz']] origNotifyeesList = origNotifyees Listings of Genesis are not the result of none other [] Notifications list = [] in origNotifyees List for Promotional: If not 'not in' notify: NotifyeesList.append (Notifyee) Back to Notification List But I am getting this error now
File "running.py", line 337, get_notifyees keyError: 'notifier' ================================ ================================================ 10 Oct. 01:53:03: Exit Position: 1
You have:
origNotifyeesList = jobdef ['notifyees'] If youastons (job deaf ['notices'], list) or job deaf ['notify'] nobody else [job deaf ['no' Ifijh ']] The KeyError if Notifications jobdef . You can catch the exception, or if you can check job in 'jobify' then you can check the where you try and use the key.
Comments
Post a Comment