You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Traceback (most recent call last):
File "C:\Users\Me Too\Desktop\Scripts\Python\Discord\pbtest.py", line 42, in
asyncio.run(main())
File "C:\Users\Me Too\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\Me Too\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Me Too\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\Me Too\Desktop\Scripts\Python\Discord\pbtest.py", line 6, in main
await client.get_pokemon_species(425)
File "C:\Users\Me Too\Desktop\Scripts\Python\Discord\venv\Lib\site-packages\aiopoke\utils\cache.py", line 27, in wrapper
obj: U = await coro(client, name_or_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Me Too\Desktop\Scripts\Python\Discord\venv\Lib\site-packages\aiopoke\aiopoke_client.py", line 260, in get_pokemon_species
return PokemonSpecies(**data)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Me Too\Desktop\Scripts\Python\Discord\venv\Lib\site-packages\aiopoke\objects\resources\pokemon\pokemon_species.py", line 105, in __init__
self.habitat = MinimalResource(**habitat)
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: aiopoke.utils.minimal_resources.MinimalResource() argument after ** must be a mapping, not NoneType
Process finished with exit code 1
Habitats were only In the Pokédex In Gen 3, so It's null on anything after that and thus trying to get the species won't work
To Reproduce
Do await client.get_pokemon_species(<name or id of Gen 4+ Pokemon>)
Expected behavior
Gets the species without being stopped by the lack of a habitat
Screenshots
Desktop (please complete the following information)
OS: Windows 10
Browser: Firefox
Version: 22H2 19045.2604 (OS) 110.0 (Browser)
The text was updated successfully, but these errors were encountered:
This should be fixed. You can wait for v0.1.5 to be released, which should be in a few days, or you pull the code from github directly. Thank you for bringing up this bug!
Describe the bug
Traceback (most recent call last):
File "C:\Users\Me Too\Desktop\Scripts\Python\Discord\pbtest.py", line 42, in
asyncio.run(main())
File "C:\Users\Me Too\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\Me Too\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Me Too\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\Me Too\Desktop\Scripts\Python\Discord\pbtest.py", line 6, in main
await client.get_pokemon_species(425)
File "C:\Users\Me Too\Desktop\Scripts\Python\Discord\venv\Lib\site-packages\aiopoke\utils\cache.py", line 27, in wrapper
obj: U = await coro(client, name_or_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Me Too\Desktop\Scripts\Python\Discord\venv\Lib\site-packages\aiopoke\aiopoke_client.py", line 260, in get_pokemon_species
return PokemonSpecies(**data)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Me Too\Desktop\Scripts\Python\Discord\venv\Lib\site-packages\aiopoke\objects\resources\pokemon\pokemon_species.py", line 105, in __init__
self.habitat = MinimalResource(**habitat)
^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: aiopoke.utils.minimal_resources.MinimalResource() argument after ** must be a mapping, not NoneType
Process finished with exit code 1
Habitats were only In the Pokédex In Gen 3, so It's null on anything after that and thus trying to get the species won't work
To Reproduce
Do await client.get_pokemon_species(<name or id of Gen 4+ Pokemon>)
Expected behavior
Gets the species without being stopped by the lack of a habitat
Screenshots
Desktop (please complete the following information)
The text was updated successfully, but these errors were encountered: