PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

Integer out of range on startup

Open Gaz492 opened this issue 10 years ago • 12 comments

Expected Behavior

Bot to start up and walk around as intended

Actual Behavior

Starts scanning area for objects then crashes

Steps to Reproduce

Other Information

Error: [2016-07-26 21:59:30] [#] Scanning area for objects (1 / 25) Traceback (most recent call last): File "pokecli.py", line 220, in <module> main() File "pokecli.py", line 211, in main bot.take_step() File "/home/PokemonGo-Bot/pokemongo_bot/__init__.py", line 36, in take_step self.stepper.take_step() File "/home/PokemonGo-Bot/pokemongo_bot/stepper.py", line 53, in take_step self._walk_to(self.config.walk, *position) File "/home/PokemonGo-Bot/pokemongo_bot/stepper.py", line 67, in _walk_to i2f(self.api._position_lat), i2f(self.api._position_lng), lat, lng) File "/home/PokemonGo-Bot/pokemongo_bot/cell_workers/utils.py", line 98, in i2f return struct.unpack('<d', struct.pack('<Q', int))[0] struct.error: integer out of range for 'Q' format code OS: Ubuntu 16.04 Git Commit: 3aca6d798f8a3e173dce0beb7b13c9505cc5b251

EDIT:

Happens in both master and dev branch

Gaz492 avatar Jul 26 '16 20:07 Gaz492

Same here...

Traceback (most recent call last):
  File "pokecli.py", line 250, in <module>
    main()
  File "pokecli.py", line 236, in main
    bot.start()
  File "/Users/me/Development/Personal/PokemonGo-Bot/pokemongo_bot/__init__.py", line 36, in start
    self._setup_api()
  File "/Users/me/Development/Personal/PokemonGo-Bot/pokemongo_bot/__init__.py", line 275, in _setup_api
    self.login()
  File "/Users/me/Development/Personal/PokemonGo-Bot/pokemongo_bot/__init__.py", line 255, in login
    lat, lng = self.position[0:2]
  File "/Users/me/Development/Personal/PokemonGo-Bot/pokemongo_bot/__init__.py", line 27, in position
    return (i2f(self.api._position_lat), i2f(self.api._position_lng), 0)
  File "/Users/me/Development/Personal/PokemonGo-Bot/pokemongo_bot/cell_workers/utils.py", line 118, in i2f
    return struct.unpack('<d', struct.pack('<Q', int))[0]
struct.error: integer out of range for 'Q' format code

chadsaun avatar Jul 26 '16 20:07 chadsaun

Same issue here as well. No modifications to source made, just straight out of the box with only a setup config.json.

My config:

{
    "auth_service": "ptc",
    "username": "xxx",
    "password": "xxx",
    "location": "40.783003,-73.965902",
    "gmapkey": "xxx",
    "max_steps": 5,
    "mode": "all",
    "walk": 4.16,
    "debug": false,
    "test": false,
    "initial_transfer": 0,
    "location_cache": true,
    "distance_unit": "km",
    "item_filter": "101,102,103,104",
    "evolve_all": "NONE"
}

DebugDax avatar Jul 26 '16 20:07 DebugDax

ideas? it worked for me a second ago

talmachani avatar Jul 26 '16 20:07 talmachani

Same error for me. Was working 30 minutes ago, I changed the location in the config.json file, and bam, now it's not working. I went and changed the loc again, still not working.

[2016-07-26 15:14:29] [x] Initial Transfer. [2016-07-26 15:14:29] [x] Preparing to transfer all duplicate Pokemon, keeping the highest CP of each type. [2016-07-26 15:14:29] [x] Will NOT transfer anything above CP 400 [2016-07-26 15:14:29] [x] Transferring Done. [2016-07-26 15:14:29] [#] [2016-07-26 15:14:29] [x] Starting PokemonGo Bot.... [2016-07-26 15:14:29] [#] Scanning area for objects (1 / 25) Traceback (most recent call last): File "pokecli.py", line 220, in main() File "pokecli.py", line 211, in main bot.take_step() File "C:\Users\jring_000\Downloads\Pokemon\PokemonGo-Bot-master\PokemonGo-Bot-master\pokemongo_bot__init__.py", line 36, in take_step self.stepper.take_step() File "C:\Users\jring_000\Downloads\Pokemon\PokemonGo-Bot-master\PokemonGo-Bot-master\pokemongo_bot\stepper.py", line 53, in take_step self._walk_to(self.config.walk, *position) File "C:\Users\jring_000\Downloads\Pokemon\PokemonGo-Bot-master\PokemonGo-Bot-master\pokemongo_bot\stepper.py", line 67, in _walk_to i2f(self.api._position_lat), i2f(self.api._position_lng), lat, lng) File "C:\Users\jring_000\Downloads\Pokemon\PokemonGo-Bot-master\PokemonGo-Bot-master\pokemongo_bot\cell_workers\utils.py", line 98, in i2f return struct.unpack('<d', struct.pack('<Q', int))[0] struct.error: integer out of range for 'Q' format code

CourseraAnon314 avatar Jul 26 '16 20:07 CourseraAnon314

same here... image

roytz avatar Jul 26 '16 20:07 roytz

Ok so its working on my ubuntu but failes in my win 10...

talmachani avatar Jul 26 '16 20:07 talmachani

In mine, the "int" parameter being passed in is actualy a float.

chadsaun avatar Jul 26 '16 20:07 chadsaun

I have same error, it was working fine couple hours ago, is it new bug?

etamity avatar Jul 26 '16 20:07 etamity

The history shows that the last update was 19 hours ago and that was only to the readme, so it seems that people who it was working with earlier today and now it's not.. Maybe the server was updated and is responding with a different value than the script expects?

EDIT: The i2f function in utils.py is supposed to return a float however mine just seems to be converting the value into a (. (reference: https://docs.python.org/2.7/library/struct.html)

i2f(40.783003) returned: '('

EDIT: The fix is located here: https://github.com/PokemonGoF/PokemonGo-Bot/issues/1046

DebugDax avatar Jul 26 '16 20:07 DebugDax

Never mind. This is fixed via comment in 1046

This is a problem caused by an update in the pgoapi from tejado. It can easily be fixed by pinning the pgoapi pip to the "v1.1.0" tag. Change the first line in the requirements.txt in this way: -e git+https://github.com/tejado/[email protected]#egg=pgoapi and update your pip with pip install -r requirements.txt

kriswong avatar Jul 26 '16 22:07 kriswong

The latest dev branch works for me now havent tried the master

Gaz492 avatar Jul 26 '16 22:07 Gaz492

Commit has been reverted, please repull. #1065

fredrik-hellmangroup avatar Jul 26 '16 23:07 fredrik-hellmangroup