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

File "pokecli.py", line 38 ImportError

Open ghost opened this issue 10 years ago • 8 comments

Traceback (most recent call last): File "pokecli.py", line 38, in import requests ImportError: No module named requests

Pls help!

ghost avatar Jul 31 '16 18:07 ghost

make sure to successfully pip2 install -r requirements.txt and follow all installation instructions

bigmanbearpig avatar Jul 31 '16 18:07 bigmanbearpig

this line working for me thanks

pip2 install -r requirements.txt

jomarocas avatar Aug 03 '16 02:08 jomarocas

Traceback (most recent call last): File "pokecli.py", line 38, in from pgoapi.exceptions import NotLoggedInException, ServerSideRequestThrottlingException, ServerBusyOrOfflineException ImportError: cannot import name ServerSideRequestThrottlingException

paulohdc avatar Aug 03 '16 04:08 paulohdc

I have the same issue with no requests module found.

I've run the installation requirements via pip (a couple of versions) and no luck.

Virtualenv is running Python 2.7.11, but have also tried with 2.7.9 and still have the same problem. Virtualenv is version 15.0.2.

Running on a Ubuntu 14.04 box. Weirdly I got it working basically first time on my Mac though.

jrjhealey avatar Aug 03 '16 09:08 jrjhealey

@jrjhealey you stay in dev enviroment? you need install pip for python

jomarocas avatar Aug 03 '16 16:08 jomarocas

@jomarocas Do you mean the dev environment of the bot, or a python dev env?

I do already have pip installed. Multiple versions for that matter, and I have tried several of them. Here's what I currently have:

ubuntu@joe-3:~/PokemonGo-Bot$ pip pip pip2 pip2.7

and

ubuntu@joe-3:~/PokemonGo-Bot$ python python python2.7-config python2-jsonpatch python3.4m python2 python2-config python3 python3m python2.7 python2-jsondiff python3.4 python-config

I should add aswell, when I run sudo pip install requests, it actually already tells me it is installed:

Requirement already satisfied (use --upgrade to upgrade): requests in /usr/local/lib/python2.7/dist-packages

Upgrading also achieves nothing as it claims there is no more recent version.

It just seems that for some reason, the python2.7 binary in my virtualenv, cannot see that module???

jrjhealey avatar Aug 03 '16 18:08 jrjhealey

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

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

paulohdc avatar Aug 03 '16 20:08 paulohdc

I'm not sure if that was part of the issue or not, I was always activating the virtualenv. However I've circumvented the problem by switching to the dev branch instead of the master.

jrjhealey avatar Aug 03 '16 20:08 jrjhealey