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

ImportError: No module named pgoapi.exceptions

Open Cephis opened this issue 10 years ago • 18 comments

cephis@Evangelion:~/PokemonGo-Bot$ ./run.sh Traceback (most recent call last): File "pokecli.py", line 42, in from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException, NoPlayerPositionSetException ImportError: No module named pgoapi.exceptions vendredi 2 septembre 2016, 17:00:45 (UTC+0200) Pokebot Stopped. Press any button or wait 20 seconds to continue.

Other Information

OS: xubuntu

Branch: dev

Python Version: Python 2.7.6

already try to reinstall 'pip install -r requirements.txt' many times

Cephis avatar Sep 02 '16 15:09 Cephis

Yesterday i had the same problem on Windows. I did a fresh install and it worked. followed the manual installation guide. don't know what caused the problem though.

avexus avatar Sep 02 '16 15:09 avexus

pip install -r requirements.txt --upgrade

sohje avatar Sep 02 '16 15:09 sohje

already try a fresh install and the 'upgrade' version

Cephis avatar Sep 02 '16 15:09 Cephis

Then I don't know, I don't run Linux. I'll try it on Mac, I have a mac. Also, I use the python 2.7.12, i think, not .6

avexus avatar Sep 02 '16 15:09 avexus

ok thanks anyway

Cephis avatar Sep 02 '16 15:09 Cephis

Can you post "pip list" output

oralunal avatar Sep 02 '16 16:09 oralunal

cephis@Evangelion:~$ pip list apt-xapian-index (0.45) argparse (1.2.1) chardet (2.0.1) colorama (0.2.5) command-not-found (0.3) debtagshw (0.1) defer (1.0.6) dirspec (13.10) dnspython (1.11.1) html5lib (0.999) httplib2 (0.8) lxml (3.3.3) oauthlib (0.6.1) oneconf (0.3.7) PAM (0.4.2) pexpect (3.1) Pillow (2.3.0) pip (1.5.4) piston-mini-client (0.7.5) psutil (1.2.1) pycrypto (2.6.1) pycups (1.9.66) pygobject (3.12.0) pyOpenSSL (0.13) pyserial (2.6) pysmbc (1.0.14.1) python-apt (0.9.3.5ubuntu2) python-debian (0.1.21-nmu2ubuntu2) pyxdg (0.25) reportlab (3.0) requests (2.2.1) sessioninstaller (0.0.0) setuptools (3.3) six (1.5.2) software-center-aptd-plugins (0.0.0) Twisted-Core (13.2.0) Twisted-Web (13.2.0) urllib3 (1.7.1) virtualenv (1.11.4) wheel (0.24.0) wsgiref (0.1.2) zope.interface (4.0.5)

Cephis avatar Sep 02 '16 16:09 Cephis

Are you sure you run this command "pip install -r requirements.txt" ? pgoapi is not on the list Run the command at bot root folder without "--upgrade"

oralunal avatar Sep 02 '16 16:09 oralunal

I'm sure: `cephis@Evangelion:~/PokemonGo-Bot$ pip install -r requirements.txt Downloading/unpacking numpy==1.11.0 (from -r requirements.txt (line 1)) Downloading numpy-1.11.0.tar.gz (4.2MB): 4.2MB downloaded Running setup.py (path:/tmp/pip_build_cephis/numpy/setup.py) egg_info for package numpy Running from numpy source directory.

warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyd' found anywhere in distribution

Downloading/unpacking networkx==1.11 (from -r requirements.txt (line 2)) Downloading networkx-1.11-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded Obtaining pgoapi from git+https://github.com/joelgreen/pgoapi.git/@fa49ada8570b0817c5a73b9315ba010fa7a47874#egg=pgoapi (from -r requirements.txt (line 3)) Updating ./src/pgoapi clone (to fa49ada8570b0817c5a73b9315ba010fa7a47874) Could not find a tag or branch 'fa49ada8570b0817c5a73b9315ba010fa7a47874', assuming commit. Running setup.py (path:/home/cephis/PokemonGo-Bot/src/pgoapi/setup.py) egg_info for package pgoapi

warning: no previously-included files matching '*.dll' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution

Installing extra requirements: 'egg' Downloading/unpacking geopy==1.11.0 (from -r requirements.txt (line 4)) Downloading geopy-1.11.0-py2.py3-none-any.whl (66kB): 66kB downloaded Downloading/unpacking protobuf==3.0.0b4 (from -r requirements.txt (line 5)) Downloading protobuf-3.0.0b4-py2.py3-none-any.whl (342kB): 342kB downloaded Downloading/unpacking requests==2.10.0 (from -r requirements.txt (line 6)) Downloading requests-2.10.0-py2.py3-none-any.whl (506kB): 506kB downloaded Downloading/unpacking requests-mock==1.0.0 (from -r requirements.txt (line 7)) Downloading requests_mock-1.0.0-py2.py3-none-any.whl Downloading/unpacking s2sphere==0.2.4 (from -r requirements.txt (line 8)) Downloading s2sphere-0.2.4-py2.py3-none-any.whl Downloading/unpacking gpsoauth==0.3.0 (from -r requirements.txt (line 9)) Downloading gpsoauth-0.3.0.tar.gz Running setup.py (path:/tmp/pip_build_cephis/gpsoauth/setup.py) egg_info for package gpsoauth

Downloading/unpacking protobuf-to-dict==0.1.0 (from -r requirements.txt (line 10)) Downloading protobuf-to-dict-0.1.0.tar.gz Running setup.py (path:/tmp/pip_build_cephis/protobuf-to-dict/setup.py) egg_info for package protobuf-to-dict

Installed /tmp/pip_build_cephis/protobuf-to-dict/nosexcover-1.0.10-py2.7.egg
Searching for coverage
Reading https://pypi.python.org/simple/coverage/
Best match: coverage 4.2
Downloading https://pypi.python.org/packages/f5/47/2e39972c41eb988d551bb2da25c4ee16ea78492ec1b6ffdf09f50cd09b92/coverage-4.2.zip#md5=9841c9e1ddc862144fda3fd7e5ba5106
Processing coverage-4.2.zip
Writing /tmp/easy_install-rN8SXL/coverage-4.2/setup.cfg
Running coverage-4.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-rN8SXL/coverage-4.2/egg-dist-tmp-WyLBdi
warning: no previously-included files found matching 'ci/appveyor.token'
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'tests/eggsrc/build'
no previously-included directories found matching 'tests/eggsrc/dist'
no previously-included directories found matching 'tests/eggsrc/*.egg-info'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution

Installed /tmp/pip_build_cephis/protobuf-to-dict/coverage-4.2-py2.7-linux-x86_64.egg
Searching for nose>=1.0
Reading https://pypi.python.org/simple/nose/
Best match: nose 1.3.7
Downloading https://pypi.python.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a3068acfa754d44d88107a44/nose-1.3.7.tar.gz#md5=4d3ad0ff07b61373d2cefc89c5d0b20b
Processing nose-1.3.7.tar.gz
Writing /tmp/easy_install-wDXyat/nose-1.3.7/setup.cfg
Running nose-1.3.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-wDXyat/nose-1.3.7/egg-dist-tmp-KZFBYp
no previously-included directories found matching 'doc/.build'

Installed /tmp/pip_build_cephis/protobuf-to-dict/nose-1.3.7-py2.7.egg
Searching for protobuf>=2.3.0
Reading https://pypi.python.org/simple/protobuf/
Best match: protobuf 3.0.0
Downloading https://pypi.python.org/packages/e7/ff/df198f342f1b6e71be00a4601973297c0399f112327e8d5e48595ba95fe9/protobuf-3.0.0-py2.7.egg#md5=a2aa47b202784121a3d8ea17daee5e25
Processing protobuf-3.0.0-py2.7.egg
Extracting protobuf-3.0.0-py2.7.egg to /tmp/pip_build_cephis/protobuf-to-dict

Installed /tmp/pip_build_cephis/protobuf-to-dict/protobuf-3.0.0-py2.7.egg
Traceback (most recent call last):
  File "<string>", line 17, in <module>
  File "/tmp/pip_build_cephis/protobuf-to-dict/setup.py", line 25, in <module>
    'Topic :: Software Development :: Libraries :: Python Modules',
  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 239, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 264, in fetch_build_eggs
    replace_conflicting=True
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 620, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 852, in best_match
    dist = working_set.find(req)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 503, in find
    raise VersionConflict(dist,req)     # XXX add more info
pkg_resources.VersionConflict: (six 1.5.2 (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.9'))
Complete output from command python setup.py egg_info:

Installed /tmp/pip_build_cephis/protobuf-to-dict/nosexcover-1.0.10-py2.7.egg

Searching for coverage

Reading https://pypi.python.org/simple/coverage/

Best match: coverage 4.2

Downloading https://pypi.python.org/packages/f5/47/2e39972c41eb988d551bb2da25c4ee16ea78492ec1b6ffdf09f50cd09b92/coverage-4.2.zip#md5=9841c9e1ddc862144fda3fd7e5ba5106

Processing coverage-4.2.zip

Writing /tmp/easy_install-rN8SXL/coverage-4.2/setup.cfg

Running coverage-4.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-rN8SXL/coverage-4.2/egg-dist-tmp-WyLBdi

warning: no previously-included files found matching 'ci/appveyor.token'

no previously-included directories found matching 'doc/_build'

no previously-included directories found matching 'tests/eggsrc/build'

no previously-included directories found matching 'tests/eggsrc/dist'

no previously-included directories found matching 'tests/eggsrc/*.egg-info'

warning: no previously-included files matching '*.py[co]' found anywhere in distribution

Installed /tmp/pip_build_cephis/protobuf-to-dict/coverage-4.2-py2.7-linux-x86_64.egg

Searching for nose>=1.0

Reading https://pypi.python.org/simple/nose/

Best match: nose 1.3.7

Downloading https://pypi.python.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a3068acfa754d44d88107a44/nose-1.3.7.tar.gz#md5=4d3ad0ff07b61373d2cefc89c5d0b20b

Processing nose-1.3.7.tar.gz

Writing /tmp/easy_install-wDXyat/nose-1.3.7/setup.cfg

Running nose-1.3.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-wDXyat/nose-1.3.7/egg-dist-tmp-KZFBYp

no previously-included directories found matching 'doc/.build'

Installed /tmp/pip_build_cephis/protobuf-to-dict/nose-1.3.7-py2.7.egg

Searching for protobuf>=2.3.0

Reading https://pypi.python.org/simple/protobuf/

Best match: protobuf 3.0.0

Downloading https://pypi.python.org/packages/e7/ff/df198f342f1b6e71be00a4601973297c0399f112327e8d5e48595ba95fe9/protobuf-3.0.0-py2.7.egg#md5=a2aa47b202784121a3d8ea17daee5e25

Processing protobuf-3.0.0-py2.7.egg

creating /tmp/pip_build_cephis/protobuf-to-dict/protobuf-3.0.0-py2.7.egg

Extracting protobuf-3.0.0-py2.7.egg to /tmp/pip_build_cephis/protobuf-to-dict

Installed /tmp/pip_build_cephis/protobuf-to-dict/protobuf-3.0.0-py2.7.egg

Traceback (most recent call last):

File "", line 17, in

File "/tmp/pip_build_cephis/protobuf-to-dict/setup.py", line 25, in

'Topic :: Software Development :: Libraries :: Python Modules',

File "/usr/lib/python2.7/distutils/core.py", line 111, in setup

_setup_distribution = dist = klass(attrs)

File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 239, in init

self.fetch_build_eggs(attrs.pop('setup_requires'))

File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 264, in fetch_build_eggs

replace_conflicting=True

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 620, in resolve

dist = best[req.key] = env.best_match(req, ws, installer)

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 852, in best_match

dist = working_set.find(req)

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 503, in find

raise VersionConflict(dist,req)     # XXX add more info

pkg_resources.VersionConflict: (six 1.5.2 (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.9'))


Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_cephis/protobuf-to-dict Storing debug log for failure in /home/cephis/.pip/pip.log `

Cephis avatar Sep 02 '16 16:09 Cephis

oh.. try run

virtualenv .
source bin/activate
pip install -r requirements.txt
python pokecli.py --af path_to_auth.json --cf path-to-config.json

sohje avatar Sep 02 '16 17:09 sohje

@sohje he has another problems installing libraries in requirements.txt .. His pip throws error for libraries btw they are not installing.

@Cephis No idea how to fix it. IMO it is about your computer or xubuntu&python.. Try to google it for every problems.

oralunal avatar Sep 02 '16 17:09 oralunal

@Cephis try command seq above this msg, seems we installing packages into system level, instead of virtualenv. And when execute ./run.sh there is no packages installed.

sohje avatar Sep 02 '16 17:09 sohje

Sohje I tried your solution , it gives me the same error

Cephis avatar Sep 02 '16 17:09 Cephis

@Cephis with manually setting virtual environment/activating and pip installation?

sohje avatar Sep 02 '16 17:09 sohje

i try: virtualenv . source bin/activate pip install -r requirements.Txt

the installation succeeded this time and the bot worked correctly, thank you very much for your help

Cephis avatar Sep 02 '16 18:09 Cephis

:octocat: nice ;))

sohje avatar Sep 02 '16 18:09 sohje

can you just confirm to me that the command to upgrade the bot is 'git pull'?

Cephis avatar Sep 02 '16 18:09 Cephis

yes

oralunal avatar Sep 02 '16 22:09 oralunal