rubenvereecken / pokemongo-api

Pokemon Go API for Python
Other
358 stars 120 forks source link

No non-repeatable submessage field "pokemon_family" #61

Open pengstrom opened 8 years ago

pengstrom commented 8 years ago

I'm getting this message when running demo.py:

Traceback (most recent call last):
  File "demo.py", line 385, in <module>
    session = poko_session.authenticate(locationLookup=args.location)
  File "/home/legopelle/webdev/python/gym-rankings-backend/pogo/api.py", line 148, in authenticate
    }[self.provider](locationLookup=locationLookup, noop=noop)
  File "/home/legopelle/webdev/python/gym-rankings-backend/pogo/api.py", line 139, in createPTCSession
    noop=noop
  File "/home/legopelle/webdev/python/gym-rankings-backend/pogo/api.py", line 71, in createPogoSession
    location
  File "/home/legopelle/webdev/python/gym-rankings-backend/pogo/session.py", line 62, in __init__
    self.getInventory()
  File "/home/legopelle/webdev/python/gym-rankings-backend/pogo/session.py", line 216, in getInventory
    self.getProfile()
  File "/home/legopelle/webdev/python/gym-rankings-backend/pogo/session.py", line 249, in getProfile
    res = self.wrapAndRequest(payload)
  File "/home/legopelle/webdev/python/gym-rankings-backend/pogo/session.py", line 153, in wrapAndRequest
    self.parseDefault(res)
  File "/home/legopelle/webdev/python/gym-rankings-backend/pogo/session.py", line 207, in parseDefault
    self.inventory = Inventory(item)
  File "/home/legopelle/webdev/python/gym-rankings-backend/pogo/inventory.py", line 76, in __init__
    if data.HasField("pokemon_family"):
  File "/usr/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 835, in HasField
    raise ValueError(error_msg % field_name)
ValueError: Protocol message has no non-repeated submessage field "pokemon_family"

Is there some setup step I have missed?

dnsBlah commented 8 years ago

I guess you did not receive a valid response from Inventory(item) ? It's empty or something..