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

Bot crashes on startup since latest pull

Open jnnck opened this issue 10 years ago • 30 comments

I just pulled latest changes, but bot won't start anymore.

Traceback (most recent call last):
  File "pokecli.py", line 795, in <module>
    main()
  File "pokecli.py", line 142, in main
    bot = start_bot(bot, config)
  File "pokecli.py", line 102, in start_bot
    initialize_task(bot, config)
  File "pokecli.py", line 93, in initialize_task
    tree = TreeConfigBuilder(bot, config.raw_tasks).build()
  File "/Users/jannickvandaele/Sites/prive/bots/a/pokemongo_bot/tree_config_builder.py", line 79, in build
    instance = worker(self.bot, task_config)
  File "/Users/jannickvandaele/Sites/prive/bots/a/pokemongo_bot/base_task.py", line 23, in __init__
    self.initialize()
  File "/Users/jannickvandaele/Sites/prive/bots/a/pokemongo_bot/cell_workers/follow_spiral.py", line 23, in initialize
    self.points = cycle(self.spiral+list(reversed(self.spiral)[1:-1]))
TypeError: 'listreverseiterator' object has no attribute '__getitem__'

jnnck avatar Sep 02 '16 19:09 jnnck

Error disapears when removing "followspiral" task from config

jnnck avatar Sep 02 '16 19:09 jnnck

nothing changed to the follow spiral config for days

jnnck avatar Sep 02 '16 20:09 jnnck

+1, removing Follow Spiral task also fixed the problem

tiagoAnon avatar Sep 03 '16 01:09 tiagoAnon

@PokemonGoZ thanks for closing a perfectly legit issue... #5124

jnnck avatar Sep 03 '16 03:09 jnnck

I have removed Follow Spiral task but the problem persist! Help me!

AlessandroMinoccheri avatar Sep 03 '16 19:09 AlessandroMinoccheri

@AlessandroMinoccheri git pull and restart

sohje avatar Sep 03 '16 19:09 sohje

I have already done:

 git pull origin master
./run.sh

But on my OSX I get the error :(

AlessandroMinoccheri avatar Sep 03 '16 19:09 AlessandroMinoccheri

git branch -vvv ?

sohje avatar Sep 03 '16 19:09 sohje

* master ca94424 [origin/master] To add gmap in polyline walker. (#5137)

AlessandroMinoccheri avatar Sep 03 '16 19:09 AlessandroMinoccheri

Try to checkout dev version and start bot again, not sure if master was merged.

sohje avatar Sep 03 '16 19:09 sohje

I have checkout dev but again the error:

[2016-09-03 21:59:30] [PokemonGoBot] [INFO] [login_started] Login procedure started.
Traceback (most recent call last):
  File "pokecli.py", line 802, in <module>
    main()
  File "pokecli.py", line 238, in main
    report_summary(bot)
  File "pokecli.py", line 286, in report_summary
    metrics.capture_stats()
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/pokemongo_bot/metrics.py", line 108, in capture_stats
    response_dict = request.call()
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 221, in call
    if not self.can_call():
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 126, in can_call
    raise NotLoggedInException()
pgoapi.exceptions.NotLoggedInException
[2016-09-03 21:59:30] [sentry.errors] [ERROR] Sentry responded with an error: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
    super(ThreadedHTTPTransport, self).send(data, headers)
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
    ca_certs=self.ca_certs,
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
    return opener.open(url, data, timeout)
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
    response = self._open(req, data)
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
    '_open', req)
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
    result = func(*args)
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/site-packages/future/backports/urllib/request.py", line 1284, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1001, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1035, in _send_request
    self.endheaders(body)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 848, in _send_output
    msg += message_body
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x9c in position 1: invalid start byte
[2016-09-03 21:59:30] [sentry.errors.uncaught] [ERROR] [u'NotLoggedInException', u'  File "pokecli.py", line 802, in <module>', u'  File "pokecli.py", line 238, in main', u'  File "pokecli.py", line 286, in report_summary', u'  File "pokemongo_bot/metrics.py", line 108, in capture_stats', u'  File "pokemongo_bot/api_wrapper.py", line 221, in call', u'  File "pokemongo_bot/api_wrapper.py", line 126, in can_call']
Sab 3 Set 2016 21:59:30 CEST Pokebot  Stopped.
Press any button or wait 20 seconds to continue.
  2016-09-03 21:59:34,638 [       cli] [INFO] PokemonGO Bot v1.0
2016-09-03 21:59:34,651 [       cli] [INFO] commit: d67de1a5
2016-09-03 21:59:34,657 [       cli] [INFO] Configuration initialized
2016-09-03 21:59:34,657 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
2016-09-03 21:59:34,657 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2016-09-03 21:59:34,670 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
(12230) wsgi starting up on http://127.0.0.1:4000
2016-09-03 21:59:34,771 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): 127.0.0.1
[2016-09-03 21:59:34] [SleepSchedule] [INFO] [next_sleep] Next sleep at 12:13:55, for a duration of 5:31:28
^C[2016-09-03 21:59:34] [PokemonGoBot] [INFO] [bot_interrupted] Bot caught SIGINT. Shutting down.
[2016-09-03 21:59:34] [       cli] [INFO] 
[2016-09-03 21:59:34] [       cli] [INFO] Ran for 0:00:00
[2016-09-03 21:59:34] [       cli] [INFO] Total XP Earned: 0  Average: 0.00/h
[2016-09-03 21:59:34] [       cli] [INFO] Travelled 0.00km
[2016-09-03 21:59:34] [       cli] [INFO] Visited 0 stops
[2016-09-03 21:59:34] [       cli] [INFO] Encountered 0 pokemon, 0 caught, 0 released, 0 evolved, 0 never seen before ()
[2016-09-03 21:59:34] [       cli] [INFO] Threw 0 pokeballs
[2016-09-03 21:59:34] [       cli] [INFO] Earned 0 Stardust
[2016-09-03 21:59:34] [       cli] [INFO] Hatched eggs 0
[2016-09-03 21:59:34] [       cli] [INFO] 
[2016-09-03 21:59:34] [       cli] [INFO] Highest CP Pokemon: 
[2016-09-03 21:59:34] [       cli] [INFO] Most Perfect Pokemon: 
Sab 3 Set 2016 21:59:34 CEST Pokebot  Stopped.

AlessandroMinoccheri avatar Sep 03 '16 20:09 AlessandroMinoccheri

try to run

python pokecli.py -af path_to_auth.json -cf path_to_config.json

sohje avatar Sep 03 '16 20:09 sohje

Traceback (most recent call last):
  File "pokecli.py", line 42, in <module>
    from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException, NoPlayerPositionSetException
ImportError: No module named pgoapi.exceptions

AlessandroMinoccheri avatar Sep 03 '16 20:09 AlessandroMinoccheri

virtualenv .
source bin/activate
pip install -r requirements.txt
python pokecli.py -af path_to_auth.json -cf path_to_config.json

sohje avatar Sep 03 '16 20:09 sohje

I get the error as i run ./run.sh :(

AlessandroMinoccheri avatar Sep 03 '16 20:09 AlessandroMinoccheri

Did you try command i posted above?

sohje avatar Sep 03 '16 20:09 sohje

Yes all codes

AlessandroMinoccheri avatar Sep 03 '16 20:09 AlessandroMinoccheri

now If I run again virtualenv .

I get:

Please use the *system* python to run this script
Traceback (most recent call last):
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/bin/virtualenv", line 11, in <module>
    load_entry_point('virtualenv==15.0.3', 'console_scripts', 'virtualenv')()
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/site-packages/virtualenv-15.0.3-py2.7.egg/virtualenv.py", line 711, in main
    symlink=options.symlink)
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/lib/python2.7/site-packages/virtualenv-15.0.3-py2.7.egg/virtualenv.py", line 924, in create_environment
    site_packages=site_packages, clear=clear, symlink=symlink))
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/bin/../lib/python2.7/posixpath.py", line 367, in abspath
    if not isabs(path):
  File "/Users/alessandrominoccheri/Sites/PokemonGo-Bot/bin/../lib/python2.7/posixpath.py", line 61, in isabs
    return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

AlessandroMinoccheri avatar Sep 03 '16 20:09 AlessandroMinoccheri

Last error looks like python issue. Try to upgrade system level virtualenv module.

sohje avatar Sep 03 '16 20:09 sohje

ok how can I upgrade?

AlessandroMinoccheri avatar Sep 03 '16 20:09 AlessandroMinoccheri