[google-appengine] Unable to change billing limits

2016-04-22 Thread Emlyn
When I try to set my Max Daily Budget for my appengine app, I get this error:

---
Billing Command Failed

There was an unexpected error and your budget settings were not saved.
Please try again. If this problem persists, please contact support.
---

See screenshot attached.

This page seems to have changed in the last couple of days, and also
stopped working.

For me this was unfortunate, as my production system went over quota
and I couldn't fix it. This didn't lead to happy things.

Does anyone know a way to get around this? Is there somewhere else I
can change the max daily budget?

-- 
Emlyn

http://point7.wordpress.com - My blog
https://plus.google.com/u/0/100281903174934656260 - Google+

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAMp1VPBh%2BhrH7fn4931eivZDGCxGPe2oEsL1T%2B7JsNrsMr_-Qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Unable to change billing limits

2016-04-22 Thread George-Cristian Bîrzan
Did you try the new console, on console.cloud.google.com, it's under
appengine settings?
On 22 Apr 2016 10:12 am, "Emlyn"  wrote:

> When I try to set my Max Daily Budget for my appengine app, I get this
> error:
>
> ---
> Billing Command Failed
>
> There was an unexpected error and your budget settings were not saved.
> Please try again. If this problem persists, please contact support.
> ---
>
> See screenshot attached.
>
> This page seems to have changed in the last couple of days, and also
> stopped working.
>
> For me this was unfortunate, as my production system went over quota
> and I couldn't fix it. This didn't lead to happy things.
>
> Does anyone know a way to get around this? Is there somewhere else I
> can change the max daily budget?
>
> --
> Emlyn
>
> http://point7.wordpress.com - My blog
> https://plus.google.com/u/0/100281903174934656260 - Google+
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/CAMp1VPBh%2BhrH7fn4931eivZDGCxGPe2oEsL1T%2B7JsNrsMr_-Qg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CA%2B3w0iVap1fDNY-q%2BTyP3R7Sw%2BEoB3o%3DKYym47KNQqt15C%3DSeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Unable to change billing limits

2016-04-22 Thread Emlyn
No I didn't, and there it is! Fixed. You're a life saver.

On 22 April 2016 at 16:48, George-Cristian Bîrzan
 wrote:
> Did you try the new console, on console.cloud.google.com, it's under
> appengine settings?
>
> On 22 Apr 2016 10:12 am, "Emlyn"  wrote:
>>
>> When I try to set my Max Daily Budget for my appengine app, I get this
>> error:
>>
>> ---
>> Billing Command Failed
>>
>> There was an unexpected error and your budget settings were not saved.
>> Please try again. If this problem persists, please contact support.
>> ---
>>
>> See screenshot attached.
>>
>> This page seems to have changed in the last couple of days, and also
>> stopped working.
>>
>> For me this was unfortunate, as my production system went over quota
>> and I couldn't fix it. This didn't lead to happy things.
>>
>> Does anyone know a way to get around this? Is there somewhere else I
>> can change the max daily budget?
>>
>> --
>> Emlyn
>>
>> http://point7.wordpress.com - My blog
>> https://plus.google.com/u/0/100281903174934656260 - Google+
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-appengine+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-appengine@googlegroups.com.
>> Visit this group at https://groups.google.com/group/google-appengine.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-appengine/CAMp1VPBh%2BhrH7fn4931eivZDGCxGPe2oEsL1T%2B7JsNrsMr_-Qg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/CA%2B3w0iVap1fDNY-q%2BTyP3R7Sw%2BEoB3o%3DKYym47KNQqt15C%3DSeA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Emlyn

http://point7.wordpress.com - My blog
https://plus.google.com/u/0/100281903174934656260 - Google+

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAMp1VPAk5130juL2cgXSpSHF-pWv7RTKVAeuiRq9X7XTeNyiNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] GoogleAppengineLauncher

2016-04-22 Thread NAVEEN GANDHI
How to set the error logfile 'c:\\program 
files(x86)\Google\google_appengine\Launcher\GoogleAppengineLauncher.exe.log' 
for details

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/992f76df-9eba-45cf-8f35-852ef51cfbd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] What is the Nontraced time in stackdriver traces?

2016-04-22 Thread Shashikanth Reddy




-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/9d317b4f-e900-411b-a97a-212ab1ae2cb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Flexible App Engine (Node.js) not able to access memcached?

2016-04-22 Thread Bill Murphy
We are experiencing the same issue, it seems it is not consistent, some 
requests work, others just fail..


On Thursday, April 21, 2016 at 11:48:35 AM UTC+2, Alejandro Recarey wrote:
>
> Hi all,
>
> I have started using App Engine and am super happy with the docs and 
> examples. Kudos!
>
> However, I'm stumbling upon an issue with trying to use the memcache 
> service. I don't even know if it should work for the flexible environment. 
> I'm using the environment variables:
> MEMCACHE_PORT_11211_TCP_ADDR
>
> and:
> MEMCACHE_PORT_11211_TCP_PORT
>
> , and by logging I'm seeing that they are actually being set in 
> production, so I assume I should have access. 
>
> Howeve once in production I'm seeing this error:
>
> Error: Server at 172.17.0.3:11211 not available
>
> So they are being set (my defaults are "localhost" and "11211"), it just 
> seems I don't have access.
>
> Should the flexible App Engine environment have access to the Memcached 
> pool? Or do I have to spin up my own servers?
>
> Thanks!
>
> Alex
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f191cc41-e52f-4170-be6c-ff8205a1fd2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Flexible App Engine (Node.js) not able to access memcached?

2016-04-22 Thread Bill Murphy
Just found this:
http://stackoverflow.com/questions/36723186/memcache-response-bad-command-line-format-on-google-cloud-platform-with-large

Seems it's a problem storing values larger than 4kb.

On Friday, April 22, 2016 at 4:57:36 PM UTC+2, Bill Murphy wrote:
>
> We are experiencing the same issue, it seems it is not consistent, some 
> requests work, others just fail..
>
>
> On Thursday, April 21, 2016 at 11:48:35 AM UTC+2, Alejandro Recarey wrote:
>>
>> Hi all,
>>
>> I have started using App Engine and am super happy with the docs and 
>> examples. Kudos!
>>
>> However, I'm stumbling upon an issue with trying to use the memcache 
>> service. I don't even know if it should work for the flexible environment. 
>> I'm using the environment variables:
>> MEMCACHE_PORT_11211_TCP_ADDR
>>
>> and:
>> MEMCACHE_PORT_11211_TCP_PORT
>>
>> , and by logging I'm seeing that they are actually being set in 
>> production, so I assume I should have access. 
>>
>> Howeve once in production I'm seeing this error:
>>
>> Error: Server at 172.17.0.3:11211 not available
>>
>> So they are being set (my defaults are "localhost" and "11211"), it just 
>> seems I don't have access.
>>
>> Should the flexible App Engine environment have access to the Memcached 
>> pool? Or do I have to spin up my own servers?
>>
>> Thanks!
>>
>> Alex
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/bae51f83-c52f-483b-8fa7-dcb78d0e82bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Flexible environment auto-scaling: Instances stopped after ~2 minutes, before app even runs

2016-04-22 Thread Evan Jones
I just redeployed. It been running for the last few hours, and so far I 
haven't seen this happen again. I'll report back after it has run for a few 
days. I did notice some slightly unusual and possibly buggy behaviour 
though:

1. First: During the "set up" process, the vm boot code still tries to 
health check. It then prints a message about giving up, then sends 
/_ah/start. Seems to me that if health checking is disabled, it shouldn't 
do this (logs below).

2. I observed once instance that didn't accept traffic for a long time. It 
was stuck downloading some docker package (details below). It eventually 
did continue and start correctly, so this isn't a huge concern.


*VM Boot Health Checking*

Logs on all machines have the following:

Apr 22 15:53:21 gae-integration--track--gce-20160422t105255-pd6s 
vm_runtime_init: Apr 22 15:53:21 vm_runtime_init: start 'ah_start'.

Apr 22 15:53:21 gae-integration--track--gce-20160422t105255-pd6s 
vm_runtime_init: Apr 22 15:53:21 vm_runtime_init: ah_start: INFO: app 
container running

Apr 22 15:53:21 gae-integration--track--gce-20160422t105255-pd6s 
vm_runtime_init: Apr 22 15:53:21 vm_runtime_init: ah_start: app not 
healthy, won't send /_ah/start yet.

*   ... repeated multiple times, with access.log showing 500 errors 
fetching /_ah/health *

Apr 22 15:55:13 gae-integration--track--gce-20160422t105255-pd6s 
vm_runtime_init: Apr 22 15:55:13 vm_runtime_init: ah_start: WARNING: never 
got healthy response  from app, but sending /_ah/start query anyway.

Apr 22 15:55:15 gae-integration--track--gce-20160422t105255-pd6s 
vm_runtime_init: Apr 22 15:55:15 vm_runtime_init: Done start 'ah_start'.


At this point it starts successfully, and nothing seems to try hitting 
/_ah/health again in the access.log.



*"Stuck" running docker pull for 20 minutes*


One instance appeared to fail to accept traffic (CPU utilization was 0%), 
so I SSHed to it and found it stuck running docker pull. ps axf showed the 
following process tree (truncated):


 2771 ?S  0:00  |   \_ /bin/bash /usr/share/google/run-scripts 
/var/run/google.startup.script startup

 2772 ?S  0:00  |   \_ /bin/bash 
/usr/share/google/run-scripts /var/run/google.startup.script startup

 2907 ?S  0:00  |   \_ /bin/sh /usr/local/bin/gcloud 
docker pull us.gcr.io/(TRUNCATED)

 2915 ?S  0:00  |   \_ python -S 
/usr/local/bin/../share/google/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py
 
docker pull us.gcr.io/(TRUNCATED)

 2923 ?Sl 0:00  |   \_ docker pull 
us.gcr.io/(TRUNCATED)



syslog shows this process was stuck for 18 minutes:



Apr 22 15:36:33 gae-integration--track--gce-20160422t105255-pd6s 
vm_runtime_init: Apr 22 15:36:33 vm_runtime_init: start 'pull_app'.

Apr 22 15:36:35 gae-integration--track--gce-20160422t105255-pd6s 
vm_runtime_init: Apr 22 15:36:35 Pulling GAE_FULL_APP_CONTAINER: 
us.gcr.io/triggeredmail/appengine/integration-track-gce.20160422t105255@sha256:52dde4c6b3d053419c247afa51d4ec4093392bba5bd7f713639cbc92e561bccf

Apr 22 15:45:33 gae-integration--track--gce-20160422t105255-pd6s 
vm_unlocker: Restarting OpenBSD Secure Shell server: sshd.

Apr 22 15:53:09 gae-integration--track--gce-20160422t105255-pd6s 
vm_runtime_init: Apr 22 15:53:09 Done pulling app container

Apr 22 15:53:09 gae-integration--track--gce-20160422t105255-pd6s 
vm_runtime_init: Apr 22 15:53:09 vm_runtime_init: Done start 'pull_app'.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/33fb6b71-082c-4b8f-97c8-d478908ed6d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: GoogleAppengineLauncher

2016-04-22 Thread 'Adam (Cloud Platform Support)' via Google App Engine
Are you asking how to set the log file the launcher saves to, or how to see 
this log file?

On Friday, April 22, 2016 at 5:35:04 AM UTC-4, NAVEEN GANDHI wrote:
>
> How to set the error logfile 'c:\\program 
> files(x86)\Google\google_appengine\Launcher\GoogleAppengineLauncher.exe.log' 
> for details
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/000f899f-7ddc-44ca-89e5-362492b7e41b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] What is the Nontraced time in stackdriver traces?

2016-04-22 Thread 'Brad Abrams' via Google App Engine
Thanks for sharing this Shashikanth.  Untraced time is effectively the time
that is no covered by any non-root trace spans.  That is,
no service has reported to trace where this time is spent.  We are working
on getting more reporting in place and providing an SDK for
you to add your own custom spans.  In the mean time, we have seen customers
track down this time using logs.

Hope that helps.

..brad


On Fri, Apr 22, 2016 at 3:46 AM, Shashikanth Reddy  wrote:

>
> 
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-appengine+unsubscr...@googlegroups.com.
> To post to this group, send email to google-appengine@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-appengine/9d317b4f-e900-411b-a97a-212ab1ae2cb9%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/CAHLXp%3DHxFfMHrHUK8tpgxD5oBECfD5ys0jh2bmQUm52Te%2B7CAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Making API calls to Google Books API public data

2016-04-22 Thread Fourat Janabi

I have a GAE instance using Python 2.7.11. In it, I make several calls to 
Google's Book API, and only ever for public data. The two APIs I use are 
the book search and retrieve a specific volume. I neither want, nor ever 
plan on getting private information on these calls. When I deployed my app 
locally, the APIs always respond with the data I'm looking for. I love 
them. When I deploy my app, I get a '403 forbidden' error. Nothing I have 
tried seems to work. After several hours of research, the narrowest I can 
get it down to is that I need an OAuth2 token, which is used to request 
private user data, to request public book data. Why is this? My app will 
never request nor needs access to user data. Can anyone help with this? 
Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/2959a097-fdf5-4d13-89ba-9fcfc61e7947%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Making API calls to Google Books API public data

2016-04-22 Thread 'Adam (Cloud Platform Support)' via Google App Engine
It would help if you could post the exact code which is making the call as 
well as the exact JSON response your receive. This also seems like a good 
question to post to Stack Overflow , as it will 
have greater visibility. Check out our community support page 
 for the list of 
tags we monitor.

On Friday, April 22, 2016 at 6:55:45 PM UTC-4, Fourat Janabi wrote:
>
>
> I have a GAE instance using Python 2.7.11. In it, I make several calls to 
> Google's Book API, and only ever for public data. The two APIs I use are 
> the book search and retrieve a specific volume. I neither want, nor ever 
> plan on getting private information on these calls. When I deployed my app 
> locally, the APIs always respond with the data I'm looking for. I love 
> them. When I deploy my app, I get a '403 forbidden' error. Nothing I have 
> tried seems to work. After several hours of research, the narrowest I can 
> get it down to is that I need an OAuth2 token, which is used to request 
> private user data, to request public book data. Why is this? My app will 
> never request nor needs access to user data. Can anyone help with this? 
> Thank you.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/70e187d9-f226-409c-9671-a88c0da39c16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Making API calls to Google Books API public data

2016-04-22 Thread Fourat Janabi


On Friday, April 22, 2016 at 7:55:45 PM UTC-3, Fourat Janabi wrote:
>
>
> I have a GAE instance using Python 2.7.11. In it, I make several calls to 
> Google's Book API, and only ever for public data. The two APIs I use are 
> the book search and retrieve a specific volume. I neither want, nor ever 
> plan on getting private information on these calls. When I deployed my app 
> locally, the APIs always respond with the data I'm looking for. I love 
> them. When I deploy my app, I get a '403 forbidden' error. Nothing I have 
> tried seems to work. After several hours of research, the narrowest I can 
> get it down to is that I need an OAuth2 token, which is used to request 
> private user data, to request public book data. Why is this? My app will 
> never request nor needs access to user data. Can anyone help with this? 
> Thank you.
>

EDIT: Here is the error message I get:

  Traceback (most recent call last):
 File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 1535, in __call__
rv = self.handle_exception(request, response, e)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 1529, in __call__
rv = self.router.dispatch(request, response)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 1278, in default_dispatcher
return route.handler_adapter(request, response)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 1102, in __call__
return handler.dispatch()
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 572, in dispatch
return self.handle_exception(e, self.app.debug)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 570, in dispatch
return method(*args, **kwargs)
  File "/base/data/home/apps/s~my-life-app/1.392279800807967905/myapp.py", line 
320, in post
response_body = urlopen(request).read()
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 127, in urlopen
return _opener.open(url, data, timeout)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 410, in open
response = meth(req, response)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 523, in http_response
'http', request, response, code, msg, hdrs)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 448, in error
return self._call_chain(*args)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 382, in _call_chain
result = func(*args)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) 

HTTPError: HTTP Error 403: Forbidden

Here is the code that creates that creates the API Call:

headers = {'Accept': 'application/json'} book = Book(parent=books_key) 
book.name 
= self.request.get('name') googleBookSearch = 
"https://www.googleapis.com/books/v1/volumes?q="; googleBookVol = 
"https://www.googleapis.com/books/v1/volumes/ID"; escapedBookName = urllib.
quote(book.name) apiCall = googleBookSearch + escapedBookName + "&" + 
api_key2 request = Request(apiCall, headers=headers) response_body = urlopen
(request).read() parsed_book = json.loads(response_body) if parsed_book[
'totalItems'] != 0: volumeID = parsed_book['items'][0]['id'] googleBookVol = 
googleBookVol.replace("ID", volumeID) googleBookVol = googleBookVol + "?" + 
api_key2 logging.info(googleBookVol) request = Request(googleBookVol, 
headers=headers) response_body = urlopen(request).read() response_body = 
json.loads(response_body) book.name = response_body['volumeInfo']['title'] 
pageCount = response_body['volumeInfo']['pageCount'] book.pages = int(
pageCount) bookCover = response_body['volumeInfo']['imageLinks'][
'smallThumbnail'] book.cover = str(bookCover) book.published = str(
response_body['volumeInfo']['publishedDate']) book.author = str(
response_body['volumeInfo']['authors'][0]) book.put() 
self.redirect("/books")
Enter code here...


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/eecf80b7-4970-4562-957b-81688c96d9e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Making API calls to Google Books API public data

2016-04-22 Thread Fourat Janabi


Traceback (most recent call last):
 File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 1535, in __call__
rv = self.handle_exception(request, response, e)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 1529, in __call__
rv = self.router.dispatch(request, response)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 1278, in default_dispatcher
return route.handler_adapter(request, response)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 1102, in __call__
return handler.dispatch()
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 572, in dispatch
return self.handle_exception(e, self.app.debug)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
 line 570, in dispatch
return method(*args, **kwargs)
  File "/base/data/home/apps/s~my-life-app/1.392279800807967905/myapp.py", line 
320, in post
response_body = urlopen(request).read()
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 127, in urlopen
return _opener.open(url, data, timeout)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 410, in open
response = meth(req, response)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 523, in http_response
'http', request, response, code, msg, hdrs)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 448, in error
return self._call_chain(*args)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 382, in _call_chain
result = func(*args)
  File 
"/base/data/home/runtimes/python27/python27_dist/lib/python2.7/urllib2.py", 
line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) 

HTTPError: HTTP Error 403: Forbidden

Here is the code that creates that creates the API Call:

headers = {'Accept': 'application/json'}  
  book = Book(parent=books_key)
  book.name = self.request.get('name')
  googleBookSearch = "https://www.googleapis.com/books/v1/volumes?q=";
  googleBookVol = "https://www.googleapis.com/books/v1/volumes/ID";
  escapedBookName = urllib.quote(book.name)
  apiCall = googleBookSearch + escapedBookName + "&" + api_key2
  request = Request(apiCall, headers=headers)
  response_body = urlopen(request).read()
  parsed_book = json.loads(response_body)
  if parsed_book['totalItems'] != 0:
volumeID = parsed_book['items'][0]['id']
googleBookVol = googleBookVol.replace("ID", volumeID)
googleBookVol = googleBookVol + "?" + api_key2
logging.info(googleBookVol)
request = Request(googleBookVol, headers=headers)
response_body = urlopen(request).read()
response_body = json.loads(response_body)
book.name = response_body['volumeInfo']['title']
pageCount = response_body['volumeInfo']['pageCount']
book.pages = int(pageCount)
bookCover = response_body['volumeInfo']['imageLinks']['smallThumbnail']
book.cover = str(bookCover)
book.published = str(response_body['volumeInfo']['publishedDate'])
book.author = str(response_body['volumeInfo']['authors'][0])
book.put()
self.redirect("/books")


On Friday, April 22, 2016 at 7:55:45 PM UTC-3, Fourat Janabi wrote:
>
>
> I have a GAE instance using Python 2.7.11. In it, I make several calls to 
> Google's Book API, and only ever for public data. The two APIs I use are 
> the book search and retrieve a specific volume. I neither want, nor ever 
> plan on getting private information on these calls. When I deployed my app 
> locally, the APIs always respond with the data I'm looking for. I love 
> them. When I deploy my app, I get a '403 forbidden' error. Nothing I have 
> tried seems to work. After several hours of research, the narrowest I can 
> get it down to is that I need an OAuth2 token, which is used to request 
> private user data, to request public book data. Why is this? My app will 
> never request nor needs access to user data. Can anyone help with this? 
> Thank you.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/52be3a87-d9f6-453c-a07a-8d51a2df6c32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: connection Failing to MongoDB on Google Cloud Engine via Mongoose

2016-04-22 Thread Will Benish
Patrice, can you link to the thread you mention?  I too am having this 
problem.
-Will

On Friday, July 17, 2015 at 11:08:20 AM UTC-7, Patrice (Cloud Platform 
Support) wrote:
>
> Hi Amit,
>
> As I mentioned on the other thread you posted on, I will forward this to 
> the Google compute engine discussion group so you can follow it there.
>
> Cheers!
>
> On Thursday, July 16, 2015 at 5:06:01 PM UTC-4, Amit Srivastava wrote:
>>
>> I have a mongodb Primary server on Google Cloud Engine. 
>>
>>
>> The connection string I use from mongoose is:
>>
>> ar dbURI = 'mongodb://130.211.150.134:27017/test
>>
>>
>> Where the IP address of  the external IP of the primary mongodB server
>>
>>
>> I am trying to connect from my laptop as well to test the application by 
>> connecting to the laptop.
>>
>>
>> The error I receive is: 
>>  node_modules/mongoose/node_modules/mongodb/lib/server.js:228
>>
>> process.nextTick(function() { throw err; })
>>
>> ^
>>
>> Error: connect ETIMEDOUT
>>
>> at exports._errnoException (util.js:746:11)
>>
>> at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1000:19)
>>
>>
>> npm ERR! Darwin 14.3.0
>>
>>
>>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/a87acfec-be96-4c6d-80c6-e57683c0ac96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.