Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

While walking the bot crash, related issue post here #3315

Closed
jomarocas opened this issue Aug 9, 2016 · 3 comments
Closed

While walking the bot crash, related issue post here #3315

jomarocas opened this issue Aug 9, 2016 · 3 comments

Comments

@jomarocas
Copy link

jomarocas commented Aug 9, 2016

Expected Behavior

No errors while bot is working, i related issue where this fix

#2442

and i related issues where have similar errors maybe are the same but results are different

#3181
#3238

Actual Behavior

While walking in one hour this fail, latest pull and latest pip2 requeriments, my config file

{
    "auth_service": "google",
    "username": "[email protected]",
    "password": "xxxx",
    "location": "xxxx",
    "gmapkey": "xxxxxx ",
    "tasks": [
      {
        "type": "HandleSoftBan"
      },
      {
        "type": "CollectLevelUpReward"
      },
      {
        "type": "IncubateEggs",
        "config": {
          "longer_eggs_first": true
        }
      },
      {
        "type": "TransferPokemon"
      },
      {
        "type": "EvolvePokemon",
        "config": {
            "evolve_all": "none",
            "first_evolve_by": "cp",
            "evolve_above_cp": 500,
            "evolve_above_iv": 0.8,
            "logic": "or",
            "evolve_speed": 20,
            "use_lucky_egg": false
        }
      },
      {
        "type": "RecycleItems",
        "config": {
          "item_filter": {
            "Pokeball":       { "keep" : 10 },
            "Greatball":      { "keep" : 80 },
            "Potion":         { "keep" : 0 },
            "Super Potion":   { "keep" : 0 },
            "Hyper Potion":   { "keep" : 20 },
            "Revive":         { "keep" : 20 },
            "Razz Berry":     { "keep" : 60 }
          }
        }
      },
      {
        "type": "CatchVisiblePokemon"
      },
      {
        "type": "CatchLuredPokemon"
      },
      {
        "type": "SpinFort"
      },
      {
        "type": "MoveToFort",
        "config": {
            "lure_attraction": true,
            "lure_max_distance": 2000
        }
      },
      {
        "type": "FollowSpiral",
        "config": {
          "diameter": 4,
          "step_size": 70
        }
      }
    ],
    "map_object_cache_time": 5,
    "forts": {
      "avoid_circles": true,
      "max_circle_size": 50
    },
    "websocket_server": false,
    "walk": 14,
    "action_wait_min": 1,
    "action_wait_max": 4,
    "debug": false,
    "test": false,
    "health_record": true,
    "location_cache": true,
    "distance_unit": "km",
    "reconnecting_timeout": 15,
    "evolve_captured": "NONE",
    "catch_randomize_reticle_factor": 1.0,
    "catch_randomize_spin_factor": 1.0,
    "catch": {
      "any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
      "// Example of always catching Rattata:": {},
      "// Rattata": { "always_catch" : true }
    },
    "release": {
      "any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"},
      "Metapod": {"keep_best_cp": 2},
      "Kakuna": {"keep_best_cp": 2},
      "Pidgeotto": {"keep_best_cp": 2},
      "Raticate": {"keep_best_cp": 1},
      "Arbok": {"keep_best_cp": 2},
      "Sandslash": {"keep_best_cp": 2},
      "Golbat": {"keep_best_cp": 2},
      "// Example of keeping 2 or 10 stronger (based on CP) Pidgey:": {},
      "Pidgey": {"keep_best_cp": 10},
      "Caterpie": {"keep_best_cp": 2},
      "Weedle": {"keep_best_cp": 2},
      "Rattata": {"keep_best_cp": 2},
      "Ekans": {"keep_best_cp": 2},
      "Zubat": {"keep_best_cp": 2},
      "Magnemite": {"keep_best_cp": 2},
      "Doduo": {"keep_best_cp": 2},
      "Shellder": {"keep_best_cp": 2},
      "Horsea": {"keep_best_cp": 2},
      "Cubone": {"keep_best_cp": 2},
      "Rhyhorn": {"keep_best_cp": 2},
      "Paras": {"keep_best_cp": 2},
      "Omanyte": {"keep_best_cp": 2},
      "Jigglypuff": {"keep_best_cp": 2},
      "Nidoran♂": {"keep_best_cp": 2},
      "Venonat": {"keep_best_cp": 2},
      "Spearow": {"keep_best_cp": 2},
      "Sandshrew": {"keep_best_cp": 2},
      "Meowth": {"keep_best_cp": 2},
      "Psyduck": {"keep_best_cp": 2},
      "Mankey": {"keep_best_cp": 2},
      "Poliwag": {"keep_best_cp": 2},
      "Staryu": {"keep_best_cp": 2},
      "Abra": {"keep_best_cp": 2},
      "Machop": {"keep_best_cp": 2},
      "Tentacool": {"keep_best_cp": 2},
      "Geodude": {"keep_best_cp": 2},
      "Ponyta": {"keep_best_cp": 2},
      "Drowzee": {"keep_best_cp": 2},
      "Krabby": {"keep_best_cp": 2},
      "Voltorb": {"keep_best_cp": 2},
      "Cubone": {"keep_best_cp": 2},
      "Goldeen": {"keep_best_cp": 2},
      "Magikarp": {"keep_best_cp": 2},
      "Bulbasur": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Charmander": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Squirtle": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Pikachu": {"keep_best_cp": 5, "keep_best_iv": 1},
      "Growlithe": {"keep_best_cp": 2, "keep_best_iv": 1}
    },
    "vips" : {
         "Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
        "any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
        "Lapras": {},
        "Moltres": {},
        "Zapdos": {},
        "Articuno": {},

        "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
        "Mewtwo": {},
        "Dragonite": {},
        "Snorlax": {},
        "// Mew evolves to Mewtwo": {},
        "Mew": {},
        "Arcanine": {},
        "Vaporeon": {},
        "Gyarados": {},
        "Exeggutor": {},
        "Muk": {},
        "Weezing": {},
        "Flareon": {}

    }
}

pip install -r requirements.txt

git pull origin dev

is from 9-aug-2016

principal error

"Max retries exceeded with url: /collect"

More down log of error

Traceback (most recent call last):
  File "pokecli.py", line 521, in <module>
    main()
  File "pokecli.py", line 95, in main
    bot.tick()
  File "/home/jonathan/poke/PokemonGo-Bot/pokemongo_bot/__init__.py", line 445, in tick
    self.health_record.heartbeat()
  File "/home/jonathan/poke/PokemonGo-Bot/pokemongo_bot/health_record/bot_event.py", line 65, in heartbeat
    self.track_url('/heartbeat')
  File "/home/jonathan/poke/PokemonGo-Bot/pokemongo_bot/health_record/bot_event.py", line 78, in track_url
    'http://www.google-analytics.com/collect', data=data)
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/requests/api.py", line 111, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/requests/api.py", line 57, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/requests/sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/requests/adapters.py", line 467, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='www.google-analytics.com', port=80): Max retries exceeded with url: /collect (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f680029e410>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
2016-08-09 11:13:05,533 [sentry.errors] [ERROR] Sentry responded with an error: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128) (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
    super(ThreadedHTTPTransport, self).send(data, headers)
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
    ca_certs=self.ca_certs,
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
    return opener.open(url, data, timeout)
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
    response = self._open(req, data)
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
    '_open', req)
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
    result = func(*args)
  File "/home/jonathan/poke/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "/home/jonathan/poke/PokemonGo-Bot/local/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/lib/python2.7/httplib.py", line 1057, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1097, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 895, in _send_output
    msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)
2016-08-09 11:13:05,534 [sentry.errors.uncaught] [ERROR] [u"ConnectionError: HTTPConnectionPool(host='www.google-analytics.com', port=80): Max retries exceeded with url: /collect (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f680029e410>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))", u'  File "pokecli.py", line 521, in <module>', u'  File "pokecli.py", line 95, in main', u'  File "pokemongo_bot/__init__.py", line 445, in tick', u'  File "pokemongo_bot/health_record/bot_event.py", line 65, in heartbeat', u'  File "pokemongo_bot/health_record/bot_event.py", line 78, in track_url', u'  File "requests/api.py", line 111, in post', u'  File "requests/api.py", line 57, in request', u'  File "requests/sessions.py", line 475, in request', u'  File "requests/sessions.py", line 585, in send', u'  File "requests/adapters.py", line 467, in send']

Steps to Reproduce

Reproduce make the comand

python pokecli.py -cf ./configs/config.json

and later of success and later of large time the bot crash

Other Information

OS: Ubuntu 16.04
Git Commit: 0f2bddd
Python Version: Python 2.7.12 (default, Jul 1 2016, 15:12:24) ; [GCC 5.4.0 20160609] on linux2

@Philipp59
Copy link

: HTTPConnectionPool(host='www.google-analytics.com',

"health_record": true, -> "health_record": false,

@jomarocas
Copy link
Author

@Philipp59 Testing this configuration, thanks for your comment

@jomarocas
Copy link
Author

Thanks @Philipp59 working from more one hour the configuration

for all people that have the problem put helth_record : false

{
    "auth_service": "google",
    "username": "[email protected]",
    "password": "xxxx",
    "location": "xxxx",
    "gmapkey": "xxxxxx ",
    "tasks": [
      {
        "type": "HandleSoftBan"
      },
      {
        "type": "CollectLevelUpReward"
      },
      {
        "type": "IncubateEggs",
        "config": {
          "longer_eggs_first": true
        }
      },
      {
        "type": "TransferPokemon"
      },
      {
        "type": "EvolvePokemon",
        "config": {
            "evolve_all": "none",
            "first_evolve_by": "cp",
            "evolve_above_cp": 500,
            "evolve_above_iv": 0.8,
            "logic": "or",
            "evolve_speed": 20,
            "use_lucky_egg": false
        }
      },
      {
        "type": "RecycleItems",
        "config": {
          "item_filter": {
            "Pokeball":       { "keep" : 10 },
            "Greatball":      { "keep" : 80 },
            "Potion":         { "keep" : 0 },
            "Super Potion":   { "keep" : 0 },
            "Hyper Potion":   { "keep" : 20 },
            "Revive":         { "keep" : 20 },
            "Razz Berry":     { "keep" : 60 }
          }
        }
      },
      {
        "type": "CatchVisiblePokemon"
      },
      {
        "type": "CatchLuredPokemon"
      },
      {
        "type": "SpinFort"
      },
      {
        "type": "MoveToFort",
        "config": {
            "lure_attraction": true,
            "lure_max_distance": 2000
        }
      },
      {
        "type": "FollowSpiral",
        "config": {
          "diameter": 4,
          "step_size": 70
        }
      }
    ],
    "map_object_cache_time": 5,
    "forts": {
      "avoid_circles": true,
      "max_circle_size": 50
    },
    "websocket_server": false,
    "walk": 14,
    "action_wait_min": 1,
    "action_wait_max": 4,
    "debug": false,
    "test": false,
    "health_record": false,
    "location_cache": true,
    "distance_unit": "km",
    "reconnecting_timeout": 15,
    "evolve_captured": "NONE",
    "catch_randomize_reticle_factor": 1.0,
    "catch_randomize_spin_factor": 1.0,
    "catch": {
      "any": {"catch_above_cp": 0, "catch_above_iv": 0, "logic": "or"},
      "// Example of always catching Rattata:": {},
      "// Rattata": { "always_catch" : true }
    },
    "release": {
      "any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"},
      "Metapod": {"keep_best_cp": 2},
      "Kakuna": {"keep_best_cp": 2},
      "Pidgeotto": {"keep_best_cp": 2},
      "Raticate": {"keep_best_cp": 1},
      "Arbok": {"keep_best_cp": 2},
      "Sandslash": {"keep_best_cp": 2},
      "Golbat": {"keep_best_cp": 2},
      "// Example of keeping 2 or 10 stronger (based on CP) Pidgey:": {},
      "Pidgey": {"keep_best_cp": 10},
      "Caterpie": {"keep_best_cp": 2},
      "Weedle": {"keep_best_cp": 2},
      "Rattata": {"keep_best_cp": 2},
      "Ekans": {"keep_best_cp": 2},
      "Zubat": {"keep_best_cp": 2},
      "Magnemite": {"keep_best_cp": 2},
      "Doduo": {"keep_best_cp": 2},
      "Shellder": {"keep_best_cp": 2},
      "Horsea": {"keep_best_cp": 2},
      "Cubone": {"keep_best_cp": 2},
      "Rhyhorn": {"keep_best_cp": 2},
      "Paras": {"keep_best_cp": 2},
      "Omanyte": {"keep_best_cp": 2},
      "Jigglypuff": {"keep_best_cp": 2},
      "Nidoran♂": {"keep_best_cp": 2},
      "Venonat": {"keep_best_cp": 2},
      "Spearow": {"keep_best_cp": 2},
      "Sandshrew": {"keep_best_cp": 2},
      "Meowth": {"keep_best_cp": 2},
      "Psyduck": {"keep_best_cp": 2},
      "Mankey": {"keep_best_cp": 2},
      "Poliwag": {"keep_best_cp": 2},
      "Staryu": {"keep_best_cp": 2},
      "Abra": {"keep_best_cp": 2},
      "Machop": {"keep_best_cp": 2},
      "Tentacool": {"keep_best_cp": 2},
      "Geodude": {"keep_best_cp": 2},
      "Ponyta": {"keep_best_cp": 2},
      "Drowzee": {"keep_best_cp": 2},
      "Krabby": {"keep_best_cp": 2},
      "Voltorb": {"keep_best_cp": 2},
      "Cubone": {"keep_best_cp": 2},
      "Goldeen": {"keep_best_cp": 2},
      "Magikarp": {"keep_best_cp": 2},
      "Bulbasur": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Charmander": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Squirtle": {"keep_best_cp": 2, "keep_best_iv": 1},
      "Pikachu": {"keep_best_cp": 5, "keep_best_iv": 1},
      "Growlithe": {"keep_best_cp": 2, "keep_best_iv": 1}
    },
    "vips" : {
         "Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
        "any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
        "Lapras": {},
        "Moltres": {},
        "Zapdos": {},
        "Articuno": {},

        "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
        "Mewtwo": {},
        "Dragonite": {},
        "Snorlax": {},
        "// Mew evolves to Mewtwo": {},
        "Mew": {},
        "Arcanine": {},
        "Vaporeon": {},
        "Gyarados": {},
        "Exeggutor": {},
        "Muk": {},
        "Weezing": {},
        "Flareon": {}

    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants