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

CANT RUN BOT errors pokecli.py and others #3106

Closed
ponytails opened this issue Aug 8, 2016 · 24 comments
Closed

CANT RUN BOT errors pokecli.py and others #3106

ponytails opened this issue Aug 8, 2016 · 24 comments

Comments

@ponytails
Copy link

Expected Behavior

start bot

Actual Behavior

(PokemonGo-Bot) root@oldtimes:/PokemonGo-Bot# ./run.sh
2016-08-08 12:21:03,129 [ cli] [INFO] PokemonGO Bot v1.0
2016-08-08 12:21:03,132 [ cli] [INFO] Configuration initialized
2016-08-08 12:21:03,132 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
2016-08-08 12:21:03,132 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2016-08-08 12:21:03,136 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
2016-08-08 12:21:03,232 [PokemonGoBot] [INFO] [set_start_location] Setting start location.
Traceback (most recent call last):
File "pokecli.py", line 503, in
main()
File "pokecli.py", line 131, in main
report_summary(bot)
File "pokecli.py", line 140, in report_summary
metrics.capture_stats()
File "/root/PokemonGo-Bot/pokemongo_bot/metrics.py", line 76, in capture_stats
response_dict = request.call()
File "/root/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 90, in call
if not self.can_call():
File "/root/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 54, in can_call
raise NoPlayerPositionSetException()
pgoapi.exceptions.NoPlayerPositionSetException
2016-08-08 12:21:03,369 [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 "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
response = self._open(req, data)
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
'_open', req)
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "/root/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 1048, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1088, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 1044, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 886, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)
2016-08-08 12:21:03,371 [sentry.errors.uncaught] [ERROR] u'NoPlayerPositionSetException', u' File "pokecli.py", line 503, in ', u' File "pokecli.py", line 131, in main', u' File "pokecli.py", line 140, in report_summary', u' File "pokemongo_bot/metrics.py", line 76, in capture_stats', u' File "pokemongo_bot/api_wrapper.py", line 90, in call', u' File "pokemongo_bot/api_wrapper.py", line 54, in can_call' root@oldtimes:
/PokemonGo-Bot#

Steps to Reproduce

./run.sh
normal use

Other Information

OS: Ubuntu 15.04 (GNU/Linux 3.19.0-49-generic x86_64)
Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)

ff380cd

Python Version: (run 'python -V' and paste it here)

Python 2.7.9

@TobyOoO
Copy link

TobyOoO commented Aug 8, 2016

Have you set your config.json with location?
Wipe out sensitive data and paste your config.json if you can.

@hklcf
Copy link
Contributor

hklcf commented Aug 8, 2016

2016-08-08 12:21:03,371 [sentry.errors.uncaught] [ERROR] u'NoPlayerPositionSetException

@ponytails
Copy link
Author

{
"auth_service": "google",
"username": "user@gmail.com",
"password": "GMAILpassword",
"location": "country??",
"gmapkey": "AIzaSyBbaDXLl8KtKy79CFcbA4VnY9FrRbVm7iI",
"libencrypt_location": "",
"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" : 100 },
"Potion": { "keep" : 10 },
"Super Potion": { "keep" : 20 },
"Hyper Potion": { "keep" : 30 },
"Revive": { "keep" : 30 },
"Razz Berry": { "keep" : 100 }
}
}
},
{
"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": 4.16,
"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"},
"// 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": {}

}

}

@ponytails
Copy link
Author

hklcf
2016-08-08 12:21:03,371 [sentry.errors.uncaught] [ERROR] u'NoPlayerPositionSetException

what does it mean??

@hklcf
Copy link
Contributor

hklcf commented Aug 8, 2016

@ponytails check you api or location setting, it seem the bot can't set the location properly.

@ponytails
Copy link
Author

@hklcf

what u used on this ?
please see image
https://snag.gy/tsQzF2.jpg

@hklcf
Copy link
Contributor

hklcf commented Aug 8, 2016

@ponytails im using Maps JavaScript API

@ponytails
Copy link
Author

@hklcf

what type of key ? server / ios / android / browser?

@hklcf
Copy link
Contributor

hklcf commented Aug 8, 2016

browser

@hklcf
Copy link
Contributor

hklcf commented Aug 8, 2016

check the json file using jsonlint

@ponytails
Copy link
Author

@hklcf i run pokemon bot on

linux ubuntu

and what should i type on this

"libencrypt_location": "",

@hklcf
Copy link
Contributor

hklcf commented Aug 8, 2016

@ponytails just leave it blank

@ponytails
Copy link
Author

(PokemonGo-Bot) root@oldtimes:/PokemonGo-Bot# ./run.sh
2016-08-08 13:09:13,397 [ cli] [INFO] PokemonGO Bot v1.0
2016-08-08 13:09:13,399 [ cli] [INFO] Configuration initialized
2016-08-08 13:09:13,400 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
2016-08-08 13:09:13,400 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2016-08-08 13:09:13,404 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
2016-08-08 13:09:13,499 [PokemonGoBot] [INFO] [set_start_location] Setting start location.
Traceback (most recent call last):
File "pokecli.py", line 503, in
main()
File "pokecli.py", line 131, in main
report_summary(bot)
File "pokecli.py", line 140, in report_summary
metrics.capture_stats()
File "/root/PokemonGo-Bot/pokemongo_bot/metrics.py", line 76, in capture_stats
response_dict = request.call()
File "/root/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 90, in call
if not self.can_call():
File "/root/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 54, in can_call
raise NoPlayerPositionSetException()
pgoapi.exceptions.NoPlayerPositionSetException
2016-08-08 13:09:13,654 [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 "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
return opener.open(url, data, timeout)
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
response = self._open(req, data)
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
'_open', req)
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/root/PokemonGo-Bot/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
return self.do_open(ValidHTTPSConnection, req)
File "/root/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 1048, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1088, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 1044, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 886, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 1: ordinal not in range(128)
2016-08-08 13:09:13,656 [sentry.errors.uncaught] [ERROR] u'NoPlayerPositionSetException', u' File "pokecli.py", line 503, in ', u' File "pokecli.py", line 131, in main', u' File "pokecli.py", line 140, in report_summary', u' File "pokemongo_bot/metrics.py", line 76, in capture_stats', u' File "pokemongo_bot/api_wrapper.py", line 90, in call', u' File "pokemongo_bot/api_wrapper.py", line 54, in can_call' root@oldtimes:
/PokemonGo-Bot#

@hklcf
Copy link
Contributor

hklcf commented Aug 8, 2016

validate your config.json please

@ponytails
Copy link
Author

@hklcf yes its valid

@hklcf
Copy link
Contributor

hklcf commented Aug 8, 2016

Example Installation for Ubuntu
(change dev to master for the lastest master version) http://pastebin.com/pzPjXT65

@ponytails
Copy link
Author

ponytails commented Aug 8, 2016

@hklcf

it works now but im getting invalid user/pass from google

PokemonGo-Bot) root@oldtimes:~/PokemonGo-Bot# ./run.sh configs/config.json
2016-08-08 13:20:23,568 [ cli] [INFO] PokemonGO Bot v1.0
2016-08-08 13:20:23,571 [ cli] [INFO] Configuration initialized
2016-08-08 13:20:23,571 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more information:
2016-08-08 13:20:23,572 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2016-08-08 13:20:23,576 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
2016-08-08 13:20:24,173 [PokemonGoBot] [INFO] [set_start_location] Setting start location.
2016-08-08 13:20:24,174 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-08 13:20:24,174 [PokemonGoBot] [INFO] [location_found] Location found: 14.676038, 121.043700 (14.676038, 121.0437, 0.0)
2016-08-08 13:20:24,174 [PokemonGoBot] [INFO] [position_update] Now at (14.676038, 121.0437, 0)
2016-08-08 13:20:24,175 [PokemonGoBot] [INFO] [login_started] Login procedure started.
2016-08-08 13:20:24,459 [pgoapi.pgoapi] [ERROR] Login process failed: Invalid Google Username/password
2016-08-08 13:20:24,460 [PokemonGoBot] [INFO] [login_failed] Login error, server busy. Waiting 10 seconds to try again.
2016-08-08 13:20:34,731 [pgoapi.pgoapi] [ERROR] Login process failed: Invalid Google Username/password
2016-08-08 13:20:34,732 [PokemonGoBot] [INFO] [login_failed] Login error, server busy. Waiting 10 seconds to try again.
2016-08-08 13:20:45,005 [pgoapi.pgoapi] [ERROR] Login process failed: Invalid Google Username/password
2016-08-08 13:20:45,005 [PokemonGoBot] [INFO] [login_failed] Login error, server busy. Waiting 10 seconds to try again.
2016-08-08 13:20:55,254 [pgoapi.pgoapi] [ERROR] Login process failed: Invalid Google Username/password
2016-08-08 13:20:55,254 [PokemonGoBot] [INFO] [login_failed] Login error, server busy. Waiting 10 seconds to try again.
2016-08-08 13:21:05,509 [pgoapi.pgoapi] [ERROR] Login process failed: Invalid Google Username/password
2016-08-08 13:21:05,509 [PokemonGoBot] [INFO] [login_failed] Login error, server busy. Waiting 10 seconds to try again.

@ponytails
Copy link
Author

@hklcf

where will i put this ?

-p "" on configs/config.json?

@hklcf
Copy link
Contributor

hklcf commented Aug 8, 2016

@ponytails simply replace your password with the app password in the config.json file

@ponytails
Copy link
Author

thanks

@nburn42
Copy link

nburn42 commented Aug 9, 2016

Location is usually in the format
"40.758895, -73.985131"
Last time i checked it would not work if you didn't have a lot of decimal places.

there should be locations shown in some of the example config files.

@KhanMaytok
Copy link

KhanMaytok commented Aug 9, 2016

Edited :D

hoanghuynh pushed a commit to hoanghuynh/PokemonGo-Bot that referenced this issue Sep 28, 2016
* Remove unused scannedLabel() function

* Remove pogom/pgoapi if empty at startup

* use pgoapi from requirements.txt instead of copying its files

* gitignore src/

* Fixups for using mainline pgoapi

* Update pgoapi to latest HEAD

* Use get_pos_by_name from pgoapi

* Update search api for new pgoapi

* Removing cell ID's, this functionality is provided in pgoapi

* Update search for the new pgoapi (again)

* making sure we change with step location, rather than starting position

* silenced logging

* Increase scan reliability (PokemonGoF#3262)

- Handle exceptions better
 - Prevent search_workers from even fully exiting
 - High-load backoff is now backoff based instead of randomly assigned absolute
 - Logins will retry `login-retries` times before throwing an exception to
   cause the search_worker to create a new PgoAPI instance and start over

* Update pgoapi

* Show a big scary warning if user hasn't updated

* Use standard logging for this and for the check of the old pogom/pgoapi
* Automatically remove pogom/pgoapi, regardless if its empty or not.
  Its not going to be useful anymore and will cause problems.
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

6 participants