Comments (13)
The problem seems to be the ID type.
In protos/POGOProtos/Networking/Requests/Messages_pb2.py
Line 1395 I've changed "type=4" to "type=6" and it works without problems!
from pgoapi.
NicknamePokemonResponse.proto says in result enum this answer corresponds to ERROR_POKEMON_NOT_FOUND = 3;
from pgoapi.
I'm getting the same issue.
For the request I was generating, I explicitly grabbed the ID from the PokemonData in the InventoryData response - not sure if a conversion needs to be made, or if there's a mapping issue in the nickname request proto, but it seems like it should be working.
from pgoapi.
Steps to reproduce:
api.get_inventory()
response_dict = api.call()
all_pokemon = filter(lambda i: i['inventory_item_data'].has_key('pokemon_data') and not i['inventory_item_data']['pokemon_data'].has_key('is_egg'), response_dict['responses']['GET_INVENTORY']['inventory_delta']['inventory_items'])
all_pokemon = map(lambda i: i['inventory_item_data']['pokemon_data'], all_pokemon)`
pokemon_ids = map(lambda p: p['id'], all_pokemon)
responses = map(lambda p: api.nickname_pokemon(pokemon_id=p, nickname='TEST').call()['responses']['NICKNAME_POKEMON'], pokemon_ids)
This returns (for the single pokemon in my inventory) {'result': 3}
from pgoapi.
any update here?
from pgoapi.
I'm guessing this pull request fixed the issue: AeonLucid/POGOProtos#38 so I would look into #95 to fix the issue.
from pgoapi.
I'm closing this issue in favor of #95
from pgoapi.
@GreWull How should I pass the pokemon_id ? I always get the pokemon not found error :(
api.nickname_pokemon(pokemon_id = 13918471692738592768, nickname = 'Test')
response_dict = api.call()
print('Response dictionary: \n\r{}'.format(pprint.PrettyPrinter(indent=4).pformat(response_dict)))
from pgoapi.
@Techbrunch that's strange, I've seen you have commited the change.
This is the function I use (in the Pokemon Go Bot):
def rename_pokemon(self, pid, name):
self.api.nickname_pokemon(pokemon_id=pid, nickname=name)
response_dict = self.api.call()
The ID I use is type Long, I don't see why it shouldn't work..
from pgoapi.
@GreWull Not sure what was wrong but after updating the proto files now it works, thanks :)
from pgoapi.
I thought the protos where up to date but they still are not. So this issue is still not fixed.
from pgoapi.
What do you mean with they are not up to date?
from pgoapi.
Well this call is still not working if I don't manually compile the current protos from AeonLucid.
Edit: I'm going to try with a fresh repo
Edit2:Sorry with a fresh repo it works, not sure what happened ><
from pgoapi.
Related Issues (20)
- Is it possible to get rid from ctypes usage?
- Google auth via token HOT 1
- [question] Team choice HOT 2
- Wrong disappear time HOT 1
- get_gym_details problem HOT 1
- failed execution/traceback after valid login.
- self.device_info in rpc_api.py
- EmptySubrequestChainException HOT 1
- ignore HOT 1
- How to determine the level of PokeGym? HOT 1
- get_map_objects do not find anything
- Gen 2 Pokemon needs to be updated
- Changed the request mode?
- Login failed
- Request throttled by server
- python
- Help on other API HOT 2
- Tejado
- Organization
- G
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgoapi.