23andMe / api-example-flask

An example Python app on 23andMe's genome API using the flask microframework.
https://api.23andme.com
71 stars 28 forks source link

Got HTTP 500 error after grant #2

Closed node closed 10 years ago

node commented 10 years ago

Hi,

When I run this example , all is OK but when I click grant button on 23andme webpage and then callback my URL http://localhost:5000/receive_code/?code=***\ , I got a HTTP 500 error like this:

127.0.0.1 - - [27/Feb/2014 14:15:26] "GET /receive_code/?code=b3f95931ceca942351e371d94b0ebfdd HTTP/1.1" 500 -

I trace the code and found maybe here(about line 60) is blocked :

response = requests.post( "%s%s" % (BASE_API_URL, "token/"), data = parameters, verify=False )

Cloud you please give some advice ? Thanks.

node commented 10 years ago

I push a new example by tornado here https://github.com/node/api-example-tornado

purohit commented 10 years ago

I cannot reproduce your error; I just cloned the repo and did the following with success:

(api-example-flask)~VIRTUAL_ENV [master] » python client.py -i xxxxxxxxxxxxxxxxxxxxxx
Please navigate to your developer dashboard [https://api.23andme.com/dashboard/] to retrieve your client_secret.
Please enter your client_secret:
A local client for the Personal Genome API is now initialized.
 * Running on http://127.0.0.1:5000/
127.0.0.1 - - [27/Feb/2014 14:38:39] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [27/Feb/2014 14:38:40] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [27/Feb/2014 14:38:49] "GET /receive_code/?code=xxxxxxxxxxxxxx HTTP/1.1" 200 -

Any other things I should try?

node commented 10 years ago

Maybe something wrong with my local python or flask ? I use python 2.7.3 and Flask 0.10 on windows 7 . Seems this is not an utility problem . Anyway thanks although the error is not fixed :)

purohit commented 10 years ago

I updated Flask to 0.10.1 and still can't reproduce the error, tested on Linux and OSX (sorry, no Windows testing).