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

latest dev cant startup

Open zx900930 opened this issue 10 years ago • 9 comments

I got this error when running python pokecli.py

 Traceback (most recent call last):
   File "pokecli.py", line 126, in <module>
     main()
  File "pokecli.py", line 114, in main
     bot.start()
   File "E:\Program Files\PokemonGo-Bot\pokemongo_bot\__init__.py", line 29, in start
     self.stepper = Stepper(self)
   File "E:\Program Files\PokemonGo-Bot\pokemongo_bot\stepper.py", line 29, in __init__
    self.steplimit2 = self.steplimit**2
TypeError: unsupported operand type(s) for ** or pow(): 'unicode' and 'int'

update: You can solve this by edit: self.steplimit=self.config.maxsteps -> self.steplimit=int(self.config.maxsteps) in /pokemongo_bot/stepper.py

but after this you will get a new error:

 Traceback (most recent call last):
   File "pokecli.py", line 126, in <module>
     main()
   File "pokecli.py", line 114, in main
    bot.start()
   File "E:\Program Files\PokemonGo-Bot\pokemongo_bot\__init__.py", line 29, in start
     self.stepper = Stepper(self)
  File "E:\Program Files\PokemonGo-Bot\pokemongo_bot\stepper.py", line 30, in __init__
    self.origin_lat = self.bot.position[0]
 AttributeError: 'PokemonGoBot' object has no attribute 'position'

update: Delete the folder and make a fresh git clone fixed the problem.

Other Information

OS: Windows 10 Git Commit: lastest dev

zx900930 avatar Jul 23 '16 09:07 zx900930

Same here. Tried to run on OSX and through Docker too. But over here Step 3 : RUN pip install --no-cache-dir -r requirements.txt fails with

Invalid requirement: 'pip install'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 78, in __init__
    req = Requirement(req)
  File "/usr/lib/python2.7/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
    requirement_string[e.loc:e.loc + 8]))
InvalidRequirement: Invalid requirement, parse error at "u'install'"

saberone avatar Jul 23 '16 09:07 saberone

Yep, the same problem:

Invalid requirement: 'pip install' Traceback (most recent call last): File "/root/Desktop/PokemonGo-Bot/local/lib/python2.7/site-packages/pip/req/req_install.py", line 78, in __init__ req = Requirement(req) File "/root/Desktop/PokemonGo-Bot/share/python-wheels/packaging-16.7-py2.py3-none-any.whl/packaging/requirements.py", line 94, in __init__ requirement_string[e.loc:e.loc + 8])) InvalidRequirement: Invalid requirement, parse error at "u'install'"

nvhk avatar Jul 23 '16 09:07 nvhk

go into the requirements.txt and remove "pip install"

your file should begin with "-e git://github.com/tejado/pgoapi.git@1f25e907f3e5f1b603330e71041e1ad7bee7580f#egg=pgoapi" or something like this

vtuan10 avatar Jul 23 '16 09:07 vtuan10

I got this error after I switch back to dev. It has something to do with latest environment.(I updated something) Traceback (most recent call last): File "./pokecli.py", line 120, in main() File "./pokecli.py", line 108, in main bot.start() File "/Users//PokemonGo-Bot/pokemongo_bot/init.py", line 26, in start self._setup_api() File "/Users//PokemonGo-Bot/pokemongo_bot/init.py", line 98, in _setup_api player = response_dict['responses']['GET_PLAYER']['player_data'] KeyError: 'player_data'

ben8987 avatar Jul 23 '16 10:07 ben8987

@vtuan10 Replacing first line of requirements.txt with -e git://github.com/tejado/pgoapi.git@1f25e907f3e5f1b603330e71041e1ad7bee7580f#egg=pgoapi worked.

saberone avatar Jul 23 '16 10:07 saberone

None of them worked for me, but I've removed the DEBUG and Test flags in the config.json file and it worked. Might be related to #396

CharlesVu avatar Jul 23 '16 10:07 CharlesVu

When removing those flags i do not get the same result. i get the following

Traceback (most recent call last): File "C:\Users\Initez\Desktop\GoBotDev2\pokecli.py", line 126, in main() File "C:\Users\Initez\Desktop\GoBotDev2\pokecli.py", line 105, in main config = init_config() File "C:\Users\Initez\Desktop\GoBotDev2\pokecli.py", line 54, in init_config load.update(json.load(data)) File "C:\Python27\lib\json__init__.py", line 291, in load **kw) File "C:\Python27\lib\json__init__.py", line 339, in loads return _default_decoder.decode(s) File "C:\Python27\lib\json\decoder.py", line 364, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Python27\lib\json\decoder.py", line 380, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Expecting property name: line 11 column 1 (char 277)

vincesmits avatar Jul 23 '16 11:07 vincesmits

Nevermind, needed another pip install --upgrade -r requirements.txt

is now working after remove those flags.

vincesmits avatar Jul 23 '16 11:07 vincesmits

Closing as @vincesmits, @saberone, @CharlesVu stated problem is fixed.

JulianMBr avatar Jul 23 '16 21:07 JulianMBr