Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pokemon Information Error #37

Open
ghost opened this issue Mar 17, 2022 · 2 comments
Open

Pokemon Information Error #37

ghost opened this issue Mar 17, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 17, 2022

Screen Shot 2022-03-16 at 22 13 24

So I have the really clunky, awful code above in a program I am running (I know there are functions to do this, but I had to do it on my own using certain commands for a class), and I am trying to initialize a "Pokedex" for all 898 Pokemon. However I keep getting height errors for the following Pokemon:
deoxys
wormadam
giratina
shaymin
basculin
darmanitan
tornadus
thundurus
landorus
keldeo
meloetta
meowstic
aegislash
pumpkaboo
gourgeist
zygarde
oricorio
lycanroc
wishiwashi
minior
mimikyu
toxtricity
eiscue
indeedee
morpeko
urshifu

I don't exactly know what the error is, but I know it doesn't like it and I had to add the try/except here so it would at least initialize what it could. I just no it freaks out whenever it gets to those Pokemon, so I thought I would let you know.
Screen Shot 2022-03-16 at 22 11 39

This is a screenshot of the error that I get when it gets to deoxys, again not sure why that's happening because when I use the .height outside of this function for deoxys, it works just fine.
Please let me know, thank you.

@C-Garza
Copy link
Member

C-Garza commented Mar 17, 2022

I'm just glancing at this but the issue could be that all those pokemon in the api have a full name with a dash (-) because they have forms.
For example, deoxys is deoxys-normal and the api call for that is this: https://pokeapi.co/api/v2/pokemon/deoxys-normal
Calling it with just deoxys wouldn't return anything:
https://pokeapi.co/api/v2/pokemon/deoxys.

So I'm assuming somewhere that is the issue.

@Naramsim
Copy link
Member

You should cycle through pokemon-species and not pokemon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants