Hi,
I am new to Python and trying to help a friend.
I need to use a try exception to fix the error here below.
Task exception was never retrieved
future: <Task finished coro=<notification_loop() done, defined at chesterfieldbot.py:167> exception=KeyError('iv_atk',)>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "chesterfieldbot.py", line 201, in notification_loop
hundredsarray = getNewHundreds(pokearray)
File "chesterfieldbot.py", line 139, in getNewHundreds
if (getIVPercent(newArray[i]) != 100.0):
File "chesterfieldbot.py", line 20, in getIVPercent
if (poke['iv_atk'] is None or poke['iv_def'] is None or poke['iv_sta'] is None):
KeyError: 'iv_atk'
within the below code. Any help will be appreciated as I'm not too sure how I should be implementing this. Please let me know if more details are needed as I am new here and a noob.
code -> https://python-forum.io/Thread-Help-with...1#pid42111
I am new to Python and trying to help a friend.
I need to use a try exception to fix the error here below.
Task exception was never retrieved
future: <Task finished coro=<notification_loop() done, defined at chesterfieldbot.py:167> exception=KeyError('iv_atk',)>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "chesterfieldbot.py", line 201, in notification_loop
hundredsarray = getNewHundreds(pokearray)
File "chesterfieldbot.py", line 139, in getNewHundreds
if (getIVPercent(newArray[i]) != 100.0):
File "chesterfieldbot.py", line 20, in getIVPercent
if (poke['iv_atk'] is None or poke['iv_def'] is None or poke['iv_sta'] is None):
KeyError: 'iv_atk'
within the below code. Any help will be appreciated as I'm not too sure how I should be implementing this. Please let me know if more details are needed as I am new here and a noob.
code -> https://python-forum.io/Thread-Help-with...1#pid42111