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

Weird error when trying to run bot.

Open RoykeHD opened this issue 10 years ago • 18 comments

I have a weird error when i try to lauch the bot.

Traceback (most recent call last): File "pokecli.py", line 490, in main() File "pokecli.py", line 59, in main config = init_config() File "pokecli.py", line 163, in init_config load.update(json.load(data)) File "/usr/lib64/python2.7/json/init.py", line 290, in load **kw) File "/usr/lib64/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python2.7/json/decoder.py", line 381, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Expecting , delimiter: line 56 column 7 (char 1319)

I dont now what the problem is i didn't change anything.

RoykeHD avatar Aug 04 '16 16:08 RoykeHD

You're missing a comma somewhere in your config.

Bot is not working right now, FYI.

mjmadsen avatar Aug 04 '16 17:08 mjmadsen

So bot is broken?

RoykeHD avatar Aug 04 '16 17:08 RoykeHD

https://github.com/PokemonGoF/PokemonGo-Bot/issues/2540

iPression avatar Aug 04 '16 17:08 iPression

every bot is broken right now..

maestroi avatar Aug 04 '16 17:08 maestroi

For problems with JSON check Wiki, so that you will be ready when bot is fixed

iruy avatar Aug 04 '16 18:08 iruy

I found out that it was giving me a error in the decoder.py: Error: Parse error on line 1: """Implementation of J --^ Expecting 'EOF', '}', ':', ',', ']', got 'undefined'****

On line one but i cant edit the file and i didn't change it.

RoykeHD avatar Aug 04 '16 19:08 RoykeHD

Post your config @Roydeking52. Don't forget to remove your account info first though!

mjmadsen avatar Aug 04 '16 19:08 mjmadsen

 "tasks": [
  {
    "type": "HandleSoftBan"
  },
  {
    "type": "CollectLevelUpReward"
  },
  {
    "type": "IncubateEggs",
    "config": {
      "longer_eggs_first":"true"
    }
  },
  {
    "type": "TransferPokemon"
  },
  {
    "type": "EvolvePokemon",
    "config": {
        "evolve_all": "true",
        "first_evolve_by": "cp",
        "evolve_above_cp": 500,
        "evolve_above_iv": 0.8,
        "logic": "or",
        "evolve_speed": 20,
        "use_lucky_egg": true
    }
  },
  {
    "type": "RecycleItems",
    "config": {
      "item_filter": {
        "Pokeball":       { "keep" : 100 },
        "Potion":         { "keep" : 10 },
        "Super Potion":   { "keep" : 20 },
        "Hyper Potion":   { "keep" : 30 },
        "Revive":         { "keep" : 30 },
        "Razz Berry":     { "keep" : 100 }
      }
    }
  },
  {
    "type": "CatchVisiblePokemon"
  },
  {
    "type": "SpinFort"
  },
  {
    }
  }
],
"walk": 8,
"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": 300, "release_below_iv": 0, "logic": "or"},
  "// Example of always releasing Rattata:": {},
  "// Rattata": {"always_release": true},
  "// Example of keeping 3 stronger (based on CP) Pidgey:": {},
  "// Pidgey": {"keep_best_cp": 3},
  "// Example of keeping 2 stronger (based on IV) Zubat:": {},
  "// Zubat": {"keep_best_iv": 2},
  "// Also, it is working with any": {},
  "// any": {"keep_best_iv": 3},
  "// Example of keeping the 2 strongest (based on CP) and 3 best (based on IV) Zubat:": {},
  "// Zubat": {"keep_best_cp": 2, "keep_best_iv": 3}
},
"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": {}

}

}

RoykeHD avatar Aug 04 '16 19:08 RoykeHD

There are some hanging {}s at the end of your tasks list.

"type": "SpinFort"

}, { } } ],

mjmadsen avatar Aug 04 '16 19:08 mjmadsen

I removed them and still same problem

RoykeHD avatar Aug 04 '16 19:08 RoykeHD

I can assure you it is a formatting problem. I think it would be easiest to start a new config. The config also looks like you intend for it to stand in one place.

Also, swap "evolve_all": "true", for "evolve_all": "all", to collect all pokemon. Values are none, all or individual pokemon types separated by comma.

mjmadsen avatar Aug 04 '16 20:08 mjmadsen

this was a new config it didn't work. So i posted a issue and someone give me the task piece for the config.

So i don't now where to get the config file that works.

RoykeHD avatar Aug 04 '16 20:08 RoykeHD

First, what branch are you using? Master, dev? git branch That can list local branches. The one with the asterisks (*) is the active branch. Master and dev configs are entirely different and stored in different locations.

What was your config before added more stuff?

mjmadsen avatar Aug 04 '16 20:08 mjmadsen

I downloaded the latest dev yesterday and then i got the task list. And 30 min later when i started the bot i got the problem with the weird error.

RoykeHD avatar Aug 04 '16 20:08 RoykeHD

Dev version uses the following config template: https://github.com/PokemonGoF/PokemonGo-Bot/blob/dev/configs/config.json.example

mjmadsen avatar Aug 04 '16 20:08 mjmadsen

"// Mew evolves to Mewtwo": {}, ??!!

herryzh1988 avatar Aug 04 '16 20:08 herryzh1988

Okay i now get a new error.

2016-08-04 22:22:44,869 [ cli] [INFO] PokemonGO Bot v1.0 2016-08-04 22:22:44,871 [ cli] [INFO] Configuration initialized 2016-08-04 22:22:44,871 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more logrmation: 2016-08-04 22:22:44,871 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics 2016-08-04 22:22:44,874 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com Traceback (most recent call last): File "pokecli.py", line 490, in main() File "pokecli.py", line 65, in main health_record.login_success() File "/home/royschotpoort/Desktop/PokemonGo-Bot-dev/pokemongo_bot/health_record/bot_event.py", line 40, in login_success track_url('/loggedin') File "/home/royschotpoort/Desktop/PokemonGo-Bot-dev/pokemongo_bot/health_record/bot_event.py", line 66, in track_url 'http://www.google-analytics.com/collect', data=data) File "/usr/lib/python2.7/site-packages/requests/api.py", line 111, in post return request('post', url, data=data, json=json, *_kwargs) File "/usr/lib/python2.7/site-packages/requests/api.py", line 57, in request return session.request(method=method, url=url, *_kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 475, in request resp = self.send(prep, *_send_kwargs) File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 585, in send r = adapter.send(request, *_kwargs) File "/usr/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 0x386d0d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)) 2016-08-04 22:22:44,886 [sentry.errors] [ERROR] Sentry responded with an error: <urlopen error [Errno -3] Temporary failure in name resolution> (url: https://app.getsentry.com/api/90254/store/) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync super(ThreadedHTTPTransport, self).send(data, headers) File "/usr/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send ca_certs=self.ca_certs, File "/usr/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python2.7/urllib2.py", line 431, in open response = self._open(req, data) File "/usr/lib64/python2.7/urllib2.py", line 449, in _open '_open', req) File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/usr/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open return self.do_open(ValidHTTPSConnection, req) File "/usr/lib64/python2.7/urllib2.py", line 1214, in do_open raise URLError(err) URLError: <urlopen error [Errno -3] Temporary failure in name resolution> 2016-08-04 22:22:44,887 [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 0x386d0d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))", u' File "pokecli.py", line 490, in ', u' File "pokecli.py", line 65, in main', u' File "pokemongo_bot/health_record/bot_event.py", line 40, in login_success', u' File "pokemongo_bot/health_record/bot_event.py", line 66, 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']

RoykeHD avatar Aug 04 '16 20:08 RoykeHD

Read: https://github.com/PokemonGoF/PokemonGo-Bot/issues/2540

brantje avatar Aug 05 '16 06:08 brantje