PokemonGoF / PokemonGo-Bot

The Pokemon Go Bot, baking with community.
MIT License
3.87k stars 1.54k forks source link

Error after Successful Login #2639

Closed jasoares closed 8 years ago

jasoares commented 8 years ago

I know it just got updated and you are still working on it. Reporting this error just trying to help and not rush you in any way...

Expected Behavior

The bot should start tasks after login

Actual Behavior

$ python pokecli.py --config configs/anne_config.json 
2016-08-07 04:32:38,704 [       cli] [INFO] PokemonGO Bot v1.0
2016-08-07 04:32:38,707 [       cli] [INFO] Configuration initialized
2016-08-07 04:32:38,708 [pokemongo_bot.health_record.bot_event] [INFO] Health check is enabled. For more logrmation:
2016-08-07 04:32:38,708 [pokemongo_bot.health_record.bot_event] [INFO] https://github.com/PokemonGoF/PokemonGo-Bot/tree/dev#analytics
2016-08-07 04:32:38,728 [requests.packages.urllib3.connectionpool] [INFO] Starting new HTTP connection (1): www.google-analytics.com
2016-08-07 04:32:38,790 [PokemonGoBot] [INFO] [set_start_location] Setting start location.
2016-08-07 04:32:38,791 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-07 04:32:38,791 [PokemonGoBot] [INFO] [location_found] Location found: 38.753178, -9.144213 (38.753178, -9.144213, 0.0)
2016-08-07 04:32:38,791 [PokemonGoBot] [INFO] [position_update] Now at (38.753178, -9.144213, 0)
2016-08-07 04:32:38,791 [PokemonGoBot] [INFO] [login_started] Login procedure started.
2016-08-07 04:32:40,781 [PokemonGoBot] [INFO] [login_successful] Login successful.
2016-08-07 04:32:42,513 [PokemonGoBot] [INFO] 
2016-08-07 04:32:42,514 [PokemonGoBot] [INFO] --- trainer username ---
(...) trainer user information
2016-08-07 04:32:42,516 [PokemonGoBot] [INFO] 
2016-08-07 04:32:42,537 [sentry.errors.serializer] [ERROR] maximum recursion depth exceeded while calling a Python object
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/raven/utils/serializer/manager.py", line 76, in transform
    return repr(value)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 372, in __repr__
    (self._handle & (_sys.maxint*2 + 1)),
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__

...

_getitem__
    func = self._FuncPtr((name_or_ordinal, self))
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
RuntimeError: maximum recursion depth exceeded while calling a Python object
Traceback (most recent call last):
  File "pokecli.py", line 493, in <module>
    main()
  File "pokecli.py", line 127, in main
    report_summary(bot)
  File "pokecli.py", line 136, in report_summary
    metrics.capture_stats()
  File "/Users/jasoares/work/projects/PokemonGo-Bot/pokemongo_bot/metrics.py", line 76, in capture_stats
    response_dict = request.call()
  File "/Users/jasoares/work/projects/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 106, in call
    result = self._call()
  File "/Users/jasoares/work/projects/PokemonGo-Bot/pokemongo_bot/api_wrapper.py", line 63, in _call
    return PGoApiRequest.call(self)
  File "/Users/jasoares/work/projects/PokemonGo-Bot/src/pgoapi/pgoapi/pgoapi.py", line 209, in call
    request.activate_signature(lib_path)
  File "/Users/jasoares/work/projects/PokemonGo-Bot/src/pgoapi/pgoapi/rpc_api.py", line 82, in activate_signature
    ctypes.cdll.LoadLibrary(lib_path)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
    return self._dlltype(name)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(encrypt.so, 6): image not found
2016-08-07 04:32:42,550 [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 "/usr/local/lib/python2.7/site-packages/raven/transport/threaded.py", line 174, in send_sync
    super(ThreadedHTTPTransport, self).send(data, headers)
  File "/usr/local/lib/python2.7/site-packages/raven/transport/http.py", line 47, in send
    ca_certs=self.ca_certs,
  File "/usr/local/lib/python2.7/site-packages/raven/utils/http.py", line 66, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 494, in open
    response = self._open(req, data)
  File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 512, in _open
    '_open', req)
  File "/usr/local/lib/python2.7/site-packages/future/backports/urllib/request.py", line 466, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/site-packages/raven/utils/http.py", line 46, in https_open
    return self.do_open(ValidHTTPSConnection, req)
  File "/usr/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/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1057, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1097, in _send_request
    self.endheaders(body)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1053, in endheaders
    self._send_output(message_body)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/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-07 04:32:42,554 [sentry.errors.uncaught] [ERROR] [u'OSError: dlopen(encrypt.so, 6): image not found', u'  File "pokecli.py", line 493, in <module>', u'  File "pokecli.py", line 127, in main', u'  File "pokecli.py", line 136, in report_summary', u'  File "pokemongo_bot/metrics.py", line 76, in capture_stats', u'  File "pokemongo_bot/api_wrapper.py", line 106, in call', u'  File "pokemongo_bot/api_wrapper.py", line 63, in _call', u'  File "pgoapi/pgoapi.py", line 209, in call', u'  File "pgoapi/rpc_api.py", line 82, in activate_signature', u'  File "ctypes/__init__.py", line 443, in LoadLibrary', u'  File "ctypes/__init__.py", line 365, in __init__']

Steps to Reproduce

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

Other Information

OS: Mac OS X Git Commit: c21fad0e476a2ab77e8ec6eb898c03b1c3dbf3dd Python Version: Python 2.7.11

jeremie-olivier commented 8 years ago

same here

taddyhuo commented 8 years ago

I got the same error.

rykermorgan commented 8 years ago

same here

mfairch commented 8 years ago

I'm seeing this error as well.

Not sure if this helps but found this in the logs as well.

OSError: dlopen(encrypt.so, 6): image not found
philly223 commented 8 years ago

subbed for same issue

sinthu94 commented 8 years ago

same here guys

cayter commented 8 years ago

+1

cronjob4 commented 8 years ago

Anyone have a solution?

fari-99 commented 8 years ago

well, what branch you use btw? @jasoares. if you have problem installing, please use chat room for that.

rykermorgan commented 8 years ago

I fixed the issue by adding the encrypt.so file to the PokemonGo-Bot directory

EDIT: I'm running on OS X, which might make a difference for some of you.

Nepoxx commented 8 years ago

Where did you get that encrypt.so file?

xxx123x commented 8 years ago

where can i get the encrypt.so file?

rykermorgan commented 8 years ago

I got it from @segflow that posted in the slack channel.

Maybe this link will work: https://slack-files.com/T1U6G9ZEW-F1YV50RGQ-cc979942b7

Nepoxx commented 8 years ago

@rykermorgan The download link worked, however that did not resolve the issue for me.

damiantx77 commented 8 years ago

@rykermorgan Thanks! Worked for me!

jasoares commented 8 years ago

The download fixes the issue, just make sure to save the file on the project root folder with the name encrypt.so. Thanks @rykermorgan.

jryd commented 8 years ago

I'm getting this error on Debian 8, after placing encrypt.so in my root PokemonGo-Bot directory. Any ideas?

philly223 commented 8 years ago

I downloaded encrypt.so and put it into my root folder but same issue is still pulling up..

fari-99 commented 8 years ago

got different error in windows 10, already install requirement and everything

EDIT: after searching in slack, got encrypt.so for windows, and its working now.

xxx123x commented 8 years ago

for linux use this to fix load encrypt.so pull/2643 but with encrypt.so on the link above it get error invalid elf header. does anyone have other encrypt.so working for linux?

louisgv commented 8 years ago

@xxx123x http://pgoapi.com/

chozzz commented 8 years ago

To fix loading encrypt.so, For linux users, you can change on around line 600 in __init__.py..

Find line: self.api.activate_signature('encrypt.so') or such.. Replace it with:

encrypt_path = os.path.abspath("./encrypt.so")
self.api.activate_signature(encrypt_path)

Should work fine..

jryd commented 8 years ago

@chozzz doesn't work for me on Debian 8.

louisgv commented 8 years ago

Pull fermuch's master and use it until his PR ( #2643 ) is approved.

https://github.com/fermuch/PokemonGo-Bot

Remember to update your python dependencies.

chozzz commented 8 years ago

@jryd Do you have encrypt.so in the same directory with your pokecli.py?

jryd commented 8 years ago

@chozzz Yep.

xxx123x commented 8 years ago

@louisgv thanks, worked.

jryd commented 8 years ago

@louisgv that isn't working for me.

jasoares commented 8 years ago

I'll leave this open for now since it seems to be getting enough attention and helping people, however the problem is fixed for me and this can be closed if you want.

jryd commented 8 years ago

Finally got it working. Here are the steps I followed on Debian 8:

  1. Create directory to create encrypt.so manually (mkdir ~/encrypt-so)
  2. cd encrypt-so
  3. wget http://pgoapi.com/pgoencrypt.tar.gz
  4. tar -xvzf pgoencrypt.tar.gz
  5. cd pgoencrypt/src
  6. make
  7. cp libencrypt.so ~/PokemonGo-Bot/encrypt.so

Then I ran the bot and it worked fine.

andriiaveiro commented 8 years ago

thx its working for me :)

bigrat69 commented 8 years ago

can someone post that windows compatible encrypt.so file?

rlllam commented 8 years ago

Where can I get the encrypt.so file for windows?

adamtong1110 commented 8 years ago

same here too. I also have the same issue in window 10

rlllam commented 8 years ago

I found the encrypt.so file for windows: (I have windows 10) https://files.slack.com/files-pri/T1U6G9ZEW-F1Z0H2PFY/download/encrypt.so.dll

Place it in the root folder then rename the file to "encrypt.so" Worked for me, hope this helps :)

Yanush7 commented 8 years ago

@rlllam downloaded the file and renamed it & placed in root folder of the bot but still getting error ;/

jirojo2 commented 8 years ago

@Yanush7 You need to place the file within PATH or edit __init__.py to set a relative path (prepend ./ to encypted.so

manthan29jamdagni commented 8 years ago

2016-08-07 17:36:16,132 [PokemonGoBot] [INFO] Traceback (most recent call last): File "pokecli.py", line 493, in main() File "pokecli.py", line 127, in main report_summary(bot) File "pokecli.py", line 136, in report_summary metrics.capture_stats() File "G:\Manthan\IDE's\temp\nayi\PokemonGo-Bot\pokemongo_bot\metrics.py", line 76, in capture_stats response_dict = request.call() File "G:\Manthan\IDE's\temp\nayi\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 106, in call result = self._call() File "G:\Manthan\IDE's\temp\nayi\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 63, in _call return PGoApiRequest.call(self) File "g:\manthan\ide's\temp\nayi\pokemongo-bot\src\pgoapi\pgoapi\pgoapi.py", line 210, in call request.activate_signature(lib_path) File "g:\manthan\ide's\temp\nayi\pokemongo-bot\src\pgoapi\pgoapi\rpc_api.py", line 85, in activate_signature self._signature_lib = ctypes.cdll.LoadLibrary(lib_path) File "C:\Python27\lib\ctypesinit.py", line 440, in LoadLibrary return self._dlltype(name) File "C:\Python27\lib\ctypesinit.py", line 362, in init self._handle = _dlopen(self._name, mode) WindowsError: [Error 193] %1 is not a valid Win32 application

Can someone hel me i am getting this error

vergilet commented 8 years ago

@rlllam confirmed. Works well.

Yanush7 commented 8 years ago

@rlllam im using Windows 7, i downloaded the encrypt.so file for windows, and placed it in PATH, also tried changing init.py and pointing to the file but it still gives me same error like before. Ps. PATH is a Python install folder right ? LOL, as i can`t fix this error im starting questioning everything i know.

k4n30 commented 8 years ago

2768

Yanush7 commented 8 years ago

@k4n30 i just reinstalled whole dev pokemon bot, used the file from the commit you mentioned and still this same error. Maybe te reason is my 64 os? i have encrypt.dll from slack.

cocoqui commented 8 years ago

To download the file for windows that rlllam says I need to be signed up at pokemongo-bot.slack.com. How do I sign up?

DangerousHIV commented 8 years ago

can someone point me to the links to get this all installed from the beginning properly

k4n30 commented 8 years ago

2780

flopk commented 8 years ago

I too need to be signed up for Slack team but have no idea how to get this done. I nees the encrypt.so for WIN10. Is there an invite system? @rlllam

k4n30 commented 8 years ago

https://pokemongo-bot.herokuapp.com/