While trying to retrieve the official artwork for a pokemon using the example code provided, I received this error:
Traceback (most recent call last):
File "C:\Users\10student\PycharmProjects\PokemonAPITest\main.py", line 3, in <module>
s2 = pb.SpriteResource('pokemon', 1, other_sprites=True, official_artwork=True)
File "C:\Users\10student\AppData\Local\Programs\Python\Python39\lib\site-packages\pokebase\interface.py", line 246, in __init__
self._load()
File "C:\Users\10student\AppData\Local\Programs\Python\Python39\lib\site-packages\pokebase\interface.py", line 251, in _load
data = get_sprite(self.sprite_type, self.sprite_id, **self.__orginal_kwargs)
File "C:\Users\10student\AppData\Local\Programs\Python\Python39\lib\site-packages\pokebase\api.py", line 71, in get_sprite
data = _call_sprite_api(sprite_type, sprite_id, **kwargs)
File "C:\Users\10student\AppData\Local\Programs\Python\Python39\lib\site-packages\pokebase\api.py", line 54, in _call_sprite_api
response.raise_for_status()
File "C:\Users\10student\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other-sprites/official-artwork/1.png
The example in the README is slightly wrong. The code was updated at some point, so instead of using other_sprites=True, it should be other=True. I'll submit a PR to change that since this keeps happening.
While trying to retrieve the official artwork for a pokemon using the example code provided, I received this error:
I ran this exact: