PokemonGoF / PokemonGo-Bot-Desktop

The Desktop version of Pokemon Go Bot script
MIT License
408 stars 115 forks source link

ImportError: No module named pgoapi.exceptions #98

Closed ReinyDays closed 7 years ago

ReinyDays commented 7 years ago

Hi,

I am new to python and github (so please bear with me), and am trying to get this bot running. So far, I believe I installed everything correctly. I can npm start the app, but when trying to log in (with google), nothing happens and i stay at the login page.

This is what cmd says: python ./pokecli.py Python: Traceback (most recent call last): File "pokecli.py", line 38, in from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException ImportError: No module named pgoapi.exceptions

things I already tried: virtualenv . Scripts/activate.bat pip install -r requirements.txt (in gofbot folder) pip install --upgrade -r requirements.txt pip uninstall requests pip install requests

I'm on windows 7, python 2.7.10 (32bit)

I would very much appreciate some steps what to try next...

P.S: in a last ditch effort I just doubleclicked the pokecli.py in the gofbot folder. A cmd opened and the game is seemingly playing in the cmd... i am confused.

Jaytee06 commented 7 years ago

Same error. I'm on Mac El Capitan. My print out after pop install -r requirements.txt is:

Installing collected packages: numpy, geopy, protobuf, requests, future, s2sphere, pycryptodomex, gpsoauth, xxhash, pgoapi, protobuf-to-dict, googlemaps, colorama, enum34, pyyaml, haversine, polyline, python-engineio, python-socketio, itsdangerous, click, Werkzeug, MarkupSafe, Jinja2, flask, websocket-client, socketIO-client, greenlet, eventlet, gpxpy, funcsigs, pbr, mock, timeout-decorator, contextlib2, raven Found existing installation: numpy 1.8.0rc1 DEPRECATION: Uninstalling a distutils installed project (numpy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. Uninstalling numpy-1.8.0rc1: Exception: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run prefix=options.prefix_path, File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install requirement.uninstall(auto_confirm=True) File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove renames(path, new_path) File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/utils/init.py", line 267, in renames shutil.move(old, new) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move copy2(src, real_dst) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2 copystat(src, dst) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat os.chflags(dst, st.st_flags) OSError: [Errno 1] Operation not permitted: '/var/folders/qt/r07g_pt90v77kbwg7_xp_r440000gn/T/pip-LD0BRz-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info'

Jaytee06 commented 7 years ago

I can run it through the terminal and it works fine. I see that it logged in just fine and it is capturing pokemon. But, if I try to run it as the desktop application I get the No module named pgoapi.exceptions error.

AlbertoTurmina commented 7 years ago

@Jaytee06 same error, how can i log in without the visual interface?

richardgetz commented 7 years ago

Also having same error. Glad to see its not a 10.12 issue.

Jaytee06 commented 7 years ago

This is how I did it...

cd gofbot
virtualenv .
source bin/activate
pip install -r requirements.txt (ran without any errors)
cd ..
npm start 

Try to login with settings After it crashes then just exit This is just to save your login info and settings so you don't have to input it manully

cd gofbot
python pokecli.py
OscarToV commented 7 years ago

I have this error when i try this pip install -r requirements.txt. Somebody help me please.

Command "c:\users\hp\downloads\pokemongo-bot-desktop\scripts\python.exe -u -c "import setuptools, tokenize;file='c:\users\hp\appdata\local\temp\pip-build-mjeeso\xxhash\setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\hp\appdata\local\temp\pip-cqwjqj-record\install-record.txt --single-version-externally-managed --compile --install-headers c:\users\hp\downloads\pokemongo-bot-desktop\include\site\python2.7\xxhash" failed with error code 1 in c:\users\hp\appdata\local\temp\pip-build-mjeeso\xxhash\

fdxfdcfd commented 7 years ago

I use Ubuntu 14.04 when I login File "./pokecli.py", line 38, in from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException ImportError: No module named pgoapi.exceptions

Outpox commented 7 years ago

@fdxfdcfd : Try to re-run pip install -r requirements.txt with sudo.

ReinyDays commented 7 years ago

OP here: I fixed it. you have to comment lines 174, 175 ane 176 in 'main.js' (place // before them, possible with notepad) // if (os.platform() == 'win32') { // pyhonCmd = path.join(__dirname, 'pywin', 'python.exe'); // } this has already been mentioned in other entries, sorry. closing thread.

fdxfdcfd commented 7 years ago

@Outpox I run sudo pip install --upgrade -r requirements.txt or pip install -r requirements.txt and get: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-YwdSHF/protobuf-to-dict/

richardgetz commented 7 years ago

try running sudo pip install update just to make sure everything is installed without error then run what Jaytee06 mentioned

fdxfdcfd commented 7 years ago

@richardgetz I run sudo -H pip install -r requirements.txt and now it login OK but after some second it say encrypt.so is not found! Please place it in the bots root directory or set libencrypt_location in config.

Outpox commented 7 years ago

@fdxfdcfd: Well that should be self-explanatory then. Have a look at this.

fdxfdcfd commented 7 years ago

@Outpox DONE!!! thanks so much

kmsheng commented 7 years ago

i am using mac, this thread DOES NOT work at all

Outpox commented 7 years ago

Not going to help if you don't provide any info.

kmsheng commented 7 years ago

@Outpox nvm, i've downloaded the released zip instead of using dev branch

Outpox commented 7 years ago

Or you can also pull 98226a9 if you want the latest dev working version.

kmsheng commented 7 years ago

@Outpox thanks : )

thebeanieman commented 7 years ago

None of the Solutions in this thread fix this issue on MacOS Sierra.

Shell output even after the comment about commenting lines out for windows computers (has nothing at all todo with a mac computer):

Starting Python process... Bot path: /Users/David/PokemonGo-Bot-Desktop/gofbot python ./pokecli.py Python: Traceback (most recent call last): File "./pokecli.py", line 38, in from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException ImportError: No module named pgoapi.exceptions

Bot exited

lapras08 commented 7 years ago

Help. I get this error after trying pip install -r requirements.txt

lapras08-MacBook-Pro:bot lapras08$ pip install -r requirements.txt Collecting numpy==1.11.0 (from -r requirements.txt (line 1)) Using cached numpy-1.11.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl Collecting networkx==1.11 (from -r requirements.txt (line 2)) Using cached networkx-1.11-py2.py3-none-any.whl Obtaining pgoapi from git+https://github.com/keyphact/pgoapi.git@a2755eb42dfe49e359798d2f4defefc97fb8163d#egg=pgoapi (from -r requirements.txt (line 3)) Cloning https://github.com/keyphact/pgoapi.git (to a2755eb42dfe49e359798d2f4defefc97fb8163d) to ./src/pgoapi Command "git clone -q https://github.com/keyphact/pgoapi.git /Users/lapras08/Desktop/bot/src/pgoapi" failed with error code -11 in None