Unlucky-Life / ankimon

Ankimon is a Anki Addon to Gamify your learning experience
Other
83 stars 7 forks source link

TypeError: '<' not supported between instances of 'list' and 'int' #14

Closed Foxy-null closed 8 months ago

Foxy-null commented 8 months ago

This error occurred when I tried to catch Genesect 😭 (Don't worry, I caught it somehow.)

Anki 24.04 (d516a9d9)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.19045

Traceback (most recent call last):
  File "C:\Users\Foxy_null\AppData\Roaming\Anki2\addons21\1908235722\__init__.py", line 5255, in <lambda>
    qconnect(catch_button.clicked, lambda: catch_pokemon(nickname_input.text()))
  File "C:\Users\Foxy_null\AppData\Roaming\Anki2\addons21\1908235722\__init__.py", line 1672, in catch_pokemon
    new_pokemon()  # Show a new random Pokémon
  File "C:\Users\Foxy_null\AppData\Roaming\Anki2\addons21\1908235722\__init__.py", line 1724, in new_pokemon
    name, id, level, ability, type, stats, enemy_attacks, base_experience, growth_rate, hp, max_hp, ev, iv, gender, battle_status, battle_stats = generate_random_pokemon()
  File "C:\Users\Foxy_null\AppData\Roaming\Anki2\addons21\1908235722\__init__.py", line 1024, in generate_random_pokemon
    id_check = check_id_ok(id)
  File "C:\Users\Foxy_null\AppData\Roaming\Anki2\addons21\1908235722\__init__.py", line 211, in check_id_ok
    if id_num < 898:
TypeError: '<' not supported between instances of 'list' and 'int'
Foxy-null commented 8 months ago

BTW, here's a screenshot of my Genesect! :) image

[edit] I also captured Hoopa!!!!! image

Unlucky-Life commented 8 months ago

Yes there are a few issues with the min-level generate function due to the different pokemon names in poke api and pokemonshowdown

Unlucky-Life commented 8 months ago

i need to basically go through all the pokemon names between the name collections / databases i use and then basically re-match the name string when accessing these functions.

But I plan on fixing this for the next Update (will follow on Friday or Sunday)

Unlucky-Life commented 8 months ago

Quick Question: on the hoopla warning window - could you tell me / translate what the issue is there ?

Foxy-null commented 8 months ago

Sure! It says that "Anki has encountered an issue. The following addon might be the cause of the problem:"

Unlucky-Life commented 8 months ago

Were you able to copy the debug information ?Am 12.03.2024 um 11:49 schrieb Foxy_null @.***>: Sure! It says that "Anki has encountered an issue. The following addon might be the cause of the problem:"

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Foxy-null commented 8 months ago

Luckily, I kept the error message in my Stickernote software! Here's the debug info!

Anki 24.04 (d516a9d9)  (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.19045

Traceback (most recent call last):
  File "C:\Users\Foxy_null\AppData\Roaming\Anki2\addons21\1908235722\__init__.py", line 5393, in <lambda>
    qconnect(catch_button.clicked, lambda: catch_pokemon(nickname_input.text()))
  File "C:\Users\Foxy_null\AppData\Roaming\Anki2\addons21\1908235722\__init__.py", line 1798, in catch_pokemon
    new_pokemon()  # Show a new random Pokémon
  File "C:\Users\Foxy_null\AppData\Roaming\Anki2\addons21\1908235722\__init__.py", line 1850, in new_pokemon
    name, id, level, ability, type, stats, enemy_attacks, base_experience, growth_rate, hp, max_hp, ev, iv, gender, battle_status, battle_stats = generate_random_pokemon()
  File "C:\Users\Foxy_null\AppData\Roaming\Anki2\addons21\1908235722\__init__.py", line 1150, in generate_random_pokemon
    id_check = check_id_ok(id)
  File "C:\Users\Foxy_null\AppData\Roaming\Anki2\addons21\1908235722\__init__.py", line 337, in check_id_ok
    if id_num < 898:
TypeError: '<' not supported between instances of 'list' and 'int'
Unlucky-Life commented 8 months ago

amazing ! Okey now we know where the problematic function is, thank you !

Unlucky-Life commented 8 months ago

Found the issue and should be solved for the next update!