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

ImportError: cannot import name ServerSideRequestThrottlingException #2483

Closed
lnedry opened this issue Aug 3, 2016 · 10 comments
Closed

ImportError: cannot import name ServerSideRequestThrottlingException #2483

lnedry opened this issue Aug 3, 2016 · 10 comments

Comments

@lnedry
Copy link

lnedry commented Aug 3, 2016

Expected Behavior

Bot should start without crashing.

Actual Behavior

Latest dev version crashes upon starting bot.

Steps to Reproduce

Installed latest dev version using the following steps:

git clone --recursive -b dev https://github.com/PokemonGoF/PokemonGo-Bot
cd PokemonGo-Bot
virtualenv .
source bin/activate
pip install -r requirements.txt
cp ./configs/config.json.example ./configs/config.json

Then I edited only the following in configs/config.json:
auth_service
username
password
location
gmapkey

# ./run.sh
Traceback (most recent call last):
  File "pokecli.py", line 38, in <module>
    from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException
ImportError: cannot import name ServerSideRequestThrottlingException

Other Information

OS: Centos 7
Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)
361c0fa
Python Version: (run 'python -V' and paste it here)
Python 2.7.5

@Topias1
Copy link

Topias1 commented Aug 3, 2016

Same problem here.
It was working perfectly until I ran a
git pull
I am using the configuration from the file configs/config.json.example

Other information

OS: Raspbian
Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)
361c0fa
Python Version: (run 'python -V' and paste it here)
Python 2.7.9

@sgitkene
Copy link

sgitkene commented Aug 3, 2016

try pip2 install -r requirements.txt --upgrade

@lnedry
Copy link
Author

lnedry commented Aug 3, 2016

Running the following command after installing, resolved the issue:

# pip install -r requirements.txt

For some reason pgoapi wasn't installed the first time. I've have installed this multiple times with the same results.

@paulohdc
Copy link

paulohdc commented Aug 3, 2016

C:\pk\PokemonGo-DEV>pip2 install -r requirements.txt --upgrade
Requirement already up-to-date: numpy==1.11.0 in c:\python27\lib\site-packages (from -r requirements.txt (line 1))
Requirement already up-to-date: networkx==1.11 in c:\python27\lib\site-packages (from -r requirements.txt (line 2))
Obtaining pgoapi from git+https://github.com/tejado/pgoapi.git@0811db23d639039f968a82e06c7aa15a0a5016b6#egg=pgoapi (from -r requirements.txt (line 3))
Skipping because already up-to-date.
Requirement already up-to-date: geopy==1.11.0 in c:\python27\lib\site-packages (from -r requirements.txt (line 4))
Requirement already up-to-date: protobuf==3.0.0b4 in c:\python27\lib\site-packages (from -r requirements.txt (line 5))
Requirement already up-to-date: requests==2.10.0 in c:\python27\lib\site-packages (from -r requirements.txt (line 6))
Requirement already up-to-date: s2sphere==0.2.4 in c:\python27\lib\site-packages (from -r requirements.txt (line 7))
Requirement already up-to-date: gpsoauth==0.3.0 in c:\python27\lib\site-packages (from -r requirements.txt (line 8))
Requirement already up-to-date: protobuf-to-dict==0.1.0 in c:\python27\lib\site-packages (from -r requirements.txt (line 9))
Requirement already up-to-date: googlemaps==2.4.4 in c:\python27\lib\site-packages (from -r requirements.txt (line 10))
Requirement already up-to-date: colorama==0.3.7 in c:\python27\lib\site-packages (from -r requirements.txt (line 11))
Requirement already up-to-date: enum34==1.1.6 in c:\python27\lib\site-packages (from -r requirements.txt (line 12))
Requirement already up-to-date: pyyaml==3.11 in c:\python27\lib\site-packages (from -r requirements.txt (line 13))
Requirement already up-to-date: haversine==0.4.5 in c:\python27\lib\site-packages (from -r requirements.txt (line 14))
Requirement already up-to-date: polyline==1.3.1 in c:\python27\lib\site-packages (from -r requirements.txt (line 15))
Requirement already up-to-date: python-socketio==1.4.2 in c:\python27\lib\site-packages (from -r requirements.txt (line 16))
Requirement already up-to-date: flask==0.11.1 in c:\python27\lib\site-packages (from -r requirements.txt (line 17))
Requirement already up-to-date: socketIO_client==0.7.0 in c:\python27\lib\site-packages (from -r requirements.txt (line 18))
Requirement already up-to-date: eventlet==0.19.0 in c:\python27\lib\site-packages (from -r requirements.txt (line 19))
Requirement already up-to-date: universal-analytics-python==0.2.4 in c:\python27\lib\site-packages (from -r requirements.txt (line 20))
Requirement already up-to-date: gpxpy==1.1.1 in c:\python27\lib\site-packages (from -r requirements.txt (line 21))
Requirement already up-to-date: mock==2.0.0 in c:\python27\lib\site-packages (from -r requirements.txt (line 22))
Requirement already up-to-date: timeout-decorator==0.3.2 in c:\python27\lib\site-packages (from -r requirements.txt (line 23))
Requirement already up-to-date: decorator>=3.4.0 in c:\python27\lib\site-packages (from networkx==1.11->-r requirements.txt (line 2))
Requirement already up-to-date: six in c:\python27\lib\site-packages (from pgoapi->-r requirements.txt (line 3))
Requirement already up-to-date: setuptools in c:\python27\lib\site-packages (from protobuf==3.0.0b4->-r requirements.txt (line 5))
Requirement already up-to-date: future in c:\python27\lib\site-packages (from s2sphere==0.2.4->-r requirements.txt (line 7))
Requirement already up-to-date: pycryptodomex>=3.0 in c:\python27\lib\site-packages (from gpsoauth==0.3.0->-r requirements.txt (line 8))
Requirement already up-to-date: python-engineio>=0.8.0 in c:\python27\lib\site-packages (from python-socketio==1.4.2->-r requirements.txt (line 16))
Requirement already up-to-date: click>=2.0 in c:\python27\lib\site-packages (from flask==0.11.1->-r requirements.txt (line 17))
Requirement already up-to-date: Werkzeug>=0.7 in c:\python27\lib\site-packages (from flask==0.11.1->-r requirements.txt (line 17))
Requirement already up-to-date: Jinja2>=2.4 in c:\python27\lib\site-packages (from flask==0.11.1->-r requirements.txt (line 17))
Requirement already up-to-date: itsdangerous>=0.21 in c:\python27\lib\site-packages (from flask==0.11.1->-r requirements.txt (line 17))
Requirement already up-to-date: websocket-client in c:\python27\lib\site-packages (from socketIO_client==0.7.0->-r requirements.txt (line 18))
Requirement already up-to-date: greenlet>=0.3 in c:\python27\lib\site-packages (from eventlet==0.19.0->-r requirements.txt (line 19))
Requirement already up-to-date: funcsigs>=1; python_version < "3.3" in c:\python27\lib\site-packages (from mock==2.0.0->-r requirements.txt (line 22))
Requirement already up-to-date: pbr>=0.11 in c:\python27\lib\site-packages (from mock==2.0.0->-r requirements.txt (line 22))
Requirement already up-to-date: MarkupSafe in c:\python27\lib\site-packages (from Jinja2>=2.4->flask==0.11.1->-r requirements.txt (line 17))
Requirement already up-to-date: backports.ssl-match-hostname in c:\python27\lib\site-packages (from websocket-client->socketIO_client==0.7.0->-r requiremen
ts.txt (line 18))
Installing collected packages: pgoapi
Running setup.py develop for pgoapi
Successfully installed pgoapi-1.1.0

C:\pk\PokemonGo-DEV>up

C:\pk\PokemonGo-DEV>git reset --hard
HEAD is now at 2f91fd0 Fix to display stats on iterm2 terminal (#2440)

C:\pk\PokemonGo-DEV>git pull -f
Already up-to-date.

C:\pk\PokemonGo-DEV>python pokecli.py
Traceback (most recent call last):
File "pokecli.py", line 38, in
from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException
ImportError: cannot import name ServerSideRequestThrottlingException

C:\pk\PokemonGo-DEV>

@sgitkene
Copy link

sgitkene commented Aug 3, 2016

@paulohdc start it with python2?

@dosin
Copy link

dosin commented Aug 3, 2016

Run pip install -r requirements.txt several times should fix this issue.
But I still don't know why it installs pgoapi all the time, shouldn't it be already up-to-date?

@paulohdc
Copy link

paulohdc commented Aug 3, 2016

@sgitkene Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

@paulohdc
Copy link

paulohdc commented Aug 3, 2016

@sgitkene Now i know what is wrong
have to do scripts\activate then python pokecli.py -cf ./configs/config.json
the pronpt look like this (PokemonGo-Bot) C:\PokemonGo-Bot>

if i close the pronpt you have to type again scripts\activate to work !!

@AnthonyBSDE
Copy link

AnthonyBSDE commented Aug 7, 2016

Hi guys, i have same problem and i have executed the command line "pip install -r requirements.txt" , 5 - 6 times.

I don't know where is the problem, i have no error when i install all packages from requirements.txt...

When i run pokecli i have this error : cannot import name ServerSideRequestThrottlingException... Help me pls...

@mackintux
Copy link

@AnthonyBSDE @lnedry
i resolved this with the help description: http://stackoverflow.com/questions/26053982/error-setup-script-exited-with-error-command-x86-64-linux-gnu-gcc-failed-wit because when i install the requirements file, the terminal prints me a error of this, you can try this ! and re-install the requirements file with 'sudo' permission:

$ sudo pip2 install -r requirements.txt --upgrade

Elementary OS Freya
3.19.0-66-generic
64 bit
Python 2.7

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

8 participants