rubenvereecken / pokemongo-api

Pokemon Go API for Python
Other
358 stars 120 forks source link

how to specify a location with demo.py ? #89

Open blueskybreeze opened 8 years ago

blueskybreeze commented 8 years ago

is the following line supposed to work?

python demo.py -a "google" -u "email@gmail.com" -p "thepassword" -l "37.7954961,-122.3935113"

(this is a sample geolocation for the San Francisco Ferry Building)

It won't show any nearby pokemons... but in my Pokemon Go app I do see some nearby pokemons.

dnsBlah commented 8 years ago

use encrypt.so

blueskybreeze commented 8 years ago

where should encrypt.so be placed on a Mac? I placed it on all possible folders inside of pokemongo-api but it didn't work.

I saw the instruction for Pokemon Go Bot, about how to make the file encrypt.so:

http://blog.pokemongofun.com/tag/pokemon-go-encrypt-so/

but I am not running a bot... (do I need to?) and so after making the file encrypt.so I copied encrypt.so and libencrypt.soto all possible folders inside of the pokemongo-api folder but it didn't work.

dnsBlah commented 8 years ago

just place it in the same folder of demo.py and call the script with -e "filename.extension"

blueskybreeze commented 8 years ago

do you mean

python demo.py -a "google" -u "email@gmail.com" -p "thepassword" -l "37.7954961,-122.3935113" -e "encrypt.so"

?

blueskybreeze commented 8 years ago

also by the way, I am using Python 2.7.5 and I saw many lines that said I might need a newer version of Python -- not sure if it matters:

/Users/mike/.virtualenvs/django19try01/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning. SNIMissingWarning

by the way I was able to get all the player's stats, but not nearby pokemon info.

dmadisetti commented 8 years ago

did you install dependencies from requirements?

blueskybreeze commented 8 years ago

after git clone (recursive or not)... I did run a

pip install -r requirements.txt

dnsBlah commented 8 years ago

please uninstall urllib and reinstall it

blueskybreeze commented 8 years ago

is it by pip uninstall urllib ? But it will say

$  pip uninstall urllib
Cannot uninstall requirement urllib, not installed
blueskybreeze commented 8 years ago

I also tried

pip uninstall -r requirements.txt

and then

pip install -r requirements.txt

but it didn't work.

dmadisetti commented 8 years ago

Create new virtual env, then pip install . then try?

ealejand commented 8 years ago

To get rid of the SNIMissingWarnings you can pip install requests[security]

dnsBlah commented 8 years ago

cool! thanks ealehand is this something with the urllib version or something?

ealejand commented 8 years ago

Yeah, from what I've read Python 2 lacks SNI support so there's a couple packages that can supplement certificate validation.

http://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings