Closed tgyhlsb closed 8 years ago
What exactly is the issue? You've made changes to the code so are you asking for help with the changes you're trying to make, or are you making an issue because the code doesn't support the changes you're trying to make?
Sorry, I was asking help about the changes I'm trying to make. I am trying to use PGoApi.set_proxy
with this bot.
I fixed my issue by calling set_proxy
after self._set_starting_position()
. Which resolved the NoPlayerPositionSetException
.
Now I have :
Traceback (most recent call last):
File "pokecli.py", line 578, in <module>
main()
File "pokecli.py", line 145, in main
report_summary(bot)
File "pokecli.py", line 180, in report_summary
metrics.capture_stats()
File ".../pokemongo_bot/metrics.py", line 84, in capture_stats
response_dict = request.call()
File ".../pokemongo_bot/api_wrapper.py", line 93, in call
if not self.can_call():
File ".../pokemongo_bot/api_wrapper.py", line 61, in can_call
raise NotLoggedInException()
pgoapi.exceptions.NotLoggedInException
2016-08-15 12:29:27,531 [sentry.errors] [ERROR] Sentry responded with an error: 'module' object has no attribute 'HTTPSHandler' (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
File ".../lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
super(ThreadedHTTPTransport, self).send(data, headers)
File ".../lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
ca_certs=self.ca_certs,
File ".../lib/python2.7/site-packages/raven/utils/http.py", line 44, in urlopen
class ValidHTTPSHandler(urllib2.HTTPSHandler):
AttributeError: 'module' object has no attribute 'HTTPSHandler'
Which may be about the encrypt.so
, hope I am making progress.
Expected Behavior
No crash.
Actual Behavior
When I try to use a proxy with
set_proxy
fromPGoApi
I get anNoPlayerPositionSetException
.I use a free proxy I found with google:
In the
ApiWrapper.can_call()
,self._position_lat
,self._position_lng
andself._position_alt
are all set toNone
.Your config.json (remove your credentials and any other private info)
Steps to Reproduce
Replace each
self.api = ApiWrapper()
inpokemongo-bot/__init__.py
by:Other Information
OS: Mac OSX 10.11.6 Python Version: Python 2.7.6