Cant get the 'back' sprite using back = True attribute
siddhantchimankar opened this issue · 5 comments
Can you post an example of the code that does not work?
Maybe that particular pokemon doesn't have a back
sprite
It doesn't seem to work for me either, neither the back sprite or any other keyword like "female" or "official-artwork"
import pokebase as pb
s3 = pb.SpriteResource('pokemon', 1, back=True)
What i get from this:
TypeError: __init__() got an unexpected keyword argument 'back'
Edit:
You can get these sprites using
p = pb.pokemon_sprite("back/1")
But you still have to create those folders manually.
Hm, thanks for reporting. Pinging @GregHilmes
Apparently I never did a release with the sprite improvements 🤔 (sorry about that - I'm astounded this has gone unnoticed since 2017). I'll take a look at the discrepancies between the current state of the repo and the PyPI release. The good news is that master
has this bug fixed. If you need a quick fix, you can try to uninstall pokebase and reinstall with something like pip install git+https://github.com/PokeAPI/pokebase.git
for the time being, although in all honesty its been so long since I touched this code I'm not sure if that will be stable.
The long-term fix will be to actually create a release with the current state of master
, though I will take some time to make sure it is stable before doing so. (I'll close this once that release happens)
Thanks Greg! You could also set up a trigger in Travis that pushes onto Pypi when the master
is pushed.
Anyway, you are the admin of the Pypi project :)