Re: [google-appengine] Re: dev_appserver now compatible with Cloud Datastore Emulator.

2018-06-20 Thread 'Kai Wang' via Google App Engine
Actually, "cloud.google.com/go/datastore" should also work. However, at
this moment, you *have to* pass the DATASTORE_EMULATOR_HOST with the
'--env_var' flag to dev_appserver:
 --env_var DATASTORE_EMULATOR_HOST=localhost:8088

Please try this flag, hopefully it should work :)

Dev_appserver currently prunes shell env vars from local golang runtime
process. The '--env_var' flag allows you to pass environment variable to
the local go runtime process.

On Tue, Jun 19, 2018 at 5:54 PM Kai Wang  wrote:

> Hi Giuliano,
>
> Note that, for app engine standard runtime go, the recommended datastore
> library
> <https://cloud.google.com/appengine/docs/standard/go/datastore/reference>
> is
> "google.golang.org/appengine/datastore".  I've verified on my side this
> library works with dev_appserver + datastore emulator.
>
> As for "cloud.google.com/go/datastore". I am not every sure how to make
> it work in App Engine standard app.  I do have verified this cloud
> library can speak to the datastore emulator when it is *outside of *App
> Engine dev_appserver. Unfortunately I've not been able to make this library
> work inside an app engine golang app. Could you kindly attach some  code
> snippet, such that run a simple GAE go app with the cloud datastore library?
>
> Detected environment variable DATASTORE_EMULATOR_HOST=localhost:,
>
> FYI, are you sure the emulator ran on localhost: ?
>
> Thank you so much for trying this feature.
>
> I am all ears to follow up :)
>
> On Fri, Jun 1, 2018 at 6:25 AM Giuliano Ribeiro <
> giuliano.ribe...@ilegra.com> wrote:
>
>> When I setup the local env, see the log:
>> WARNING  2018-06-01 13:21:25,741 api_server.py:581] Detected environment
>> variable DATASTORE_EMULATOR_HOST=localhost:, dev_appserver will speak
>> to the Cloud Datastore emulator running on this address. The datastore_path
>> /var/folders/n4/vq69gqrn3470jyqdp1sxp2wwgn/T/appengine.None.gribeiro/datastore.db
>> will be neglected.
>> If you want datastore to store on
>> /var/folders/n4/vq69gqrn3470jyqdp1sxp2wwgn/T/appengine.None.gribeiro/datastore.db,
>> remove DATASTORE_EMULATOR_HOST from environment variables and restart
>> dev_appserver
>>
>> And my app still writing/reading from the cloud.
>>
>> On Wednesday, May 30, 2018 at 6:55:32 PM UTC+1, Kai Wang wrote:
>>>
>>> According to the documentation
>>> <https://cloud.google.com/datastore/docs/tools/datastore-emulator#setting_environment_variables>,
>>> you need to have the env var "DATASTORE_EMUALTOR_HOST" set.
>>>
>>> Also, FYI, this "cloud.google.com/go/datastore" (officially, it is
>>> called Google Cloud Client Library), should be able to connect to the
>>> datatore emulator, no matter the code runs inside or outside of the
>>> dev_appserver.
>>>
>>> Please check the env var and lmk if they work :)
>>>
>>> On Wednesday, May 30, 2018 at 6:39:05 AM UTC-7, Giuliano Ribeiro wrote:
>>>>
>>>> Hi Kai Wang, I'm using "cloud.google.com/go/datastore"
>>>> As I read in the documentation this datastore package support the
>>>> emulator, I was thinking it should be easy to use. But even enabling the
>>>> emulator in the dev_appserver, my app is reading and writing directly in
>>>> the cloud, ignoring the emulator.
>>>>
>>>> Thanks,
>>>>
>>>> On Tuesday, May 29, 2018 at 8:08:08 PM UTC+1, Kai Wang wrote:
>>>>>
>>>>> Hi Glullano,
>>>>>
>>>>> What go libraries are you using? Is it
>>>>> google.golang.org/appengine/datastore (link
>>>>> <https://cloud.google.com/appengine/docs/standard/go/datastore/reference>)
>>>>> ?
>>>>> Did it store locally before?
>>>>>
>>>>> You can email  k...@google.com for further details :)
>>>>>
>>>>>
>>>>> On Friday, May 25, 2018 at 9:04:42 AM UTC-7, Giuliano Ribeiro wrote:
>>>>>>
>>>>>> Really nice, but how to put it to work ?
>>>>>> I'm using with Go, even setting up to true, my app still saving data
>>>>>> in the cloud.
>>>>>>
>>>>>> Thank you,
>>>>>>
>>>>>>
>>>>>> On Wednesday, May 16, 2018 at 9:57:42 PM UTC+1, Steren Giannini wrote:
>>>>>>>
>>>>>>> Dear App Engine users,
>>>>>>>
>>>>>&

Re: [google-appengine] Re: dev_appserver now compatible with Cloud Datastore Emulator.

2018-06-19 Thread &#x27;Kai Wang' via Google App Engine
Hi Giuliano,

Note that, for app engine standard runtime go, the recommended datastore
library
<https://cloud.google.com/appengine/docs/standard/go/datastore/reference>is
"google.golang.org/appengine/datastore".  I've verified on my side this
library works with dev_appserver + datastore emulator.

As for "cloud.google.com/go/datastore". I am not every sure how to make it
work in App Engine standard app.  I do have verified this cloud library can
speak to the datastore emulator when it is *outside of *App Engine
dev_appserver. Unfortunately I've not been able to make this library work
inside an app engine golang app. Could you kindly attach some  code
snippet, such that run a simple GAE go app with the cloud datastore library?

Detected environment variable DATASTORE_EMULATOR_HOST=localhost:,

FYI, are you sure the emulator ran on localhost: ?

Thank you so much for trying this feature.

I am all ears to follow up :)

On Fri, Jun 1, 2018 at 6:25 AM Giuliano Ribeiro 
wrote:

> When I setup the local env, see the log:
> WARNING  2018-06-01 13:21:25,741 api_server.py:581] Detected environment
> variable DATASTORE_EMULATOR_HOST=localhost:, dev_appserver will speak
> to the Cloud Datastore emulator running on this address. The datastore_path
> /var/folders/n4/vq69gqrn3470jyqdp1sxp2wwgn/T/appengine.None.gribeiro/datastore.db
> will be neglected.
> If you want datastore to store on
> /var/folders/n4/vq69gqrn3470jyqdp1sxp2wwgn/T/appengine.None.gribeiro/datastore.db,
> remove DATASTORE_EMULATOR_HOST from environment variables and restart
> dev_appserver
>
> And my app still writing/reading from the cloud.
>
> On Wednesday, May 30, 2018 at 6:55:32 PM UTC+1, Kai Wang wrote:
>>
>> According to the documentation
>> <https://cloud.google.com/datastore/docs/tools/datastore-emulator#setting_environment_variables>,
>> you need to have the env var "DATASTORE_EMUALTOR_HOST" set.
>>
>> Also, FYI, this "cloud.google.com/go/datastore" (officially, it is
>> called Google Cloud Client Library), should be able to connect to the
>> datatore emulator, no matter the code runs inside or outside of the
>> dev_appserver.
>>
>> Please check the env var and lmk if they work :)
>>
>> On Wednesday, May 30, 2018 at 6:39:05 AM UTC-7, Giuliano Ribeiro wrote:
>>>
>>> Hi Kai Wang, I'm using "cloud.google.com/go/datastore"
>>> As I read in the documentation this datastore package support the
>>> emulator, I was thinking it should be easy to use. But even enabling the
>>> emulator in the dev_appserver, my app is reading and writing directly in
>>> the cloud, ignoring the emulator.
>>>
>>> Thanks,
>>>
>>> On Tuesday, May 29, 2018 at 8:08:08 PM UTC+1, Kai Wang wrote:
>>>>
>>>> Hi Glullano,
>>>>
>>>> What go libraries are you using? Is it
>>>> google.golang.org/appengine/datastore (link
>>>> <https://cloud.google.com/appengine/docs/standard/go/datastore/reference>)
>>>> ?
>>>> Did it store locally before?
>>>>
>>>> You can email  k...@google.com for further details :)
>>>>
>>>>
>>>> On Friday, May 25, 2018 at 9:04:42 AM UTC-7, Giuliano Ribeiro wrote:
>>>>>
>>>>> Really nice, but how to put it to work ?
>>>>> I'm using with Go, even setting up to true, my app still saving data
>>>>> in the cloud.
>>>>>
>>>>> Thank you,
>>>>>
>>>>>
>>>>> On Wednesday, May 16, 2018 at 9:57:42 PM UTC+1, Steren Giannini wrote:
>>>>>>
>>>>>> Dear App Engine users,
>>>>>>
>>>>>> We are pleased to announce that the App Engine local development
>>>>>> server (dev_appserver) is now compatible with the Cloud Datastore
>>>>>> Emulator
>>>>>> <https://cloud.google.com/datastore/docs/tools/datastore-emulator>.
>>>>>>
>>>>>> You can opt-in to this feature by running:
>>>>>> * dev_appserver.py --support_datastore_emulator*
>>>>>>
>>>>>> By using the --support_datastore_emulator flag, dev_appserver will
>>>>>> use Cloud Datastore Emulator for local datastore emulation. You can read
>>>>>> more about the migration process here
>>>>>> <https://cloud.google.com/appengine/docs/standard/python/tools/migrate-cloud-datastore-emulator>
>>>>>> .
>>>>>> The development server and C

[google-appengine] Re: dev_appserver now compatible with Cloud Datastore Emulator.

2018-05-30 Thread &#x27;Kai Wang' via Google App Engine
According to the documentation 
<https://cloud.google.com/datastore/docs/tools/datastore-emulator#setting_environment_variables>,
 
you need to have the env var "DATASTORE_EMUALTOR_HOST" set. 

Also, FYI, this "cloud.google.com/go/datastore" (officially, it is called 
Google Cloud Client Library), should be able to connect to the datatore 
emulator, no matter the code runs inside or outside of the dev_appserver.

Please check the env var and lmk if they work :)

On Wednesday, May 30, 2018 at 6:39:05 AM UTC-7, Giuliano Ribeiro wrote:
>
> Hi Kai Wang, I'm using "cloud.google.com/go/datastore"
> As I read in the documentation this datastore package support the 
> emulator, I was thinking it should be easy to use. But even enabling the 
> emulator in the dev_appserver, my app is reading and writing directly in 
> the cloud, ignoring the emulator. 
>
> Thanks,
>
> On Tuesday, May 29, 2018 at 8:08:08 PM UTC+1, Kai Wang wrote:
>>
>> Hi Glullano,
>>
>> What go libraries are you using? Is it 
>> google.golang.org/appengine/datastore (link 
>> <https://cloud.google.com/appengine/docs/standard/go/datastore/reference>) 
>> ?
>> Did it store locally before?
>>
>> You can email  k...@google.com for further details :)
>>
>>
>> On Friday, May 25, 2018 at 9:04:42 AM UTC-7, Giuliano Ribeiro wrote:
>>>
>>> Really nice, but how to put it to work ?
>>> I'm using with Go, even setting up to true, my app still saving data in 
>>> the cloud.
>>>
>>> Thank you, 
>>>
>>>
>>> On Wednesday, May 16, 2018 at 9:57:42 PM UTC+1, Steren Giannini wrote:
>>>>
>>>> Dear App Engine users,
>>>>
>>>> We are pleased to announce that the App Engine local development server 
>>>> (dev_appserver) is now compatible with the Cloud Datastore Emulator 
>>>> <https://cloud.google.com/datastore/docs/tools/datastore-emulator>.
>>>>
>>>> You can opt-in to this feature by running:
>>>> * dev_appserver.py --support_datastore_emulator*
>>>>
>>>> By using the --support_datastore_emulator flag, dev_appserver will use 
>>>> Cloud Datastore Emulator for local datastore emulation. You can read more 
>>>> about the migration process here 
>>>> <https://cloud.google.com/appengine/docs/standard/python/tools/migrate-cloud-datastore-emulator>
>>>> .
>>>> The development server and Cloud Datastore Emulator support the 
>>>> interoperation of ndb and Cloud Datastore client libraries. 
>>>>
>>>> Please help us test this feature. Our goal is to enable it by default 
>>>> in the future.
>>>> Please share your feedback by replying directly to this thread. We are 
>>>> looking forward to it!
>>>>
>>>> Thanks,
>>>> Steren
>>>> Product Manager
>>>> Google Cloud
>>>>
>>>
>>>
>>> <https://lp.google-mkto.com/index.php/email/emailWebview?mkt_tok=eyJpIjoiWkdNM09UQTVOek0wWmpabSIsInQiOiJLTUp1dEptSzBXaVF3WmNFd3FMTGdJN2swY3dCNUFlNmVrOWVZWllxXC95OHVEdGRacHhkUmxZRkZOXC9TbEx4bkhWRnlES3RrU1hlWkVkMEFudkdMb1h3PT0ifQ%3D%3D>
>>
>>
>
> <https://lp.google-mkto.com/index.php/email/emailWebview?mkt_tok=eyJpIjoiWkdNM09UQTVOek0wWmpabSIsInQiOiJLTUp1dEptSzBXaVF3WmNFd3FMTGdJN2swY3dCNUFlNmVrOWVZWllxXC95OHVEdGRacHhkUmxZRkZOXC9TbEx4bkhWRnlES3RrU1hlWkVkMEFudkdMb1h3PT0ifQ%3D%3D>

-- 
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/b0a4744e-755e-4ee7-93d5-967fc3b79c8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: dev_appserver now compatible with Cloud Datastore Emulator.

2018-05-29 Thread &#x27;Kai Wang' via Google App Engine
Hi Glullano,

What go libraries are you using? Is it google.golang.org/appengine/datastore
 (link 
) ?
Did it store locally before?

You can email  k...@google.com for further details :)


On Friday, May 25, 2018 at 9:04:42 AM UTC-7, Giuliano Ribeiro wrote:
>
> Really nice, but how to put it to work ?
> I'm using with Go, even setting up to true, my app still saving data in 
> the cloud.
>
> Thank you, 
>
>
> On Wednesday, May 16, 2018 at 9:57:42 PM UTC+1, Steren Giannini wrote:
>>
>> Dear App Engine users,
>>
>> We are pleased to announce that the App Engine local development server 
>> (dev_appserver) is now compatible with the Cloud Datastore Emulator 
>> .
>>
>> You can opt-in to this feature by running:
>> * dev_appserver.py --support_datastore_emulator*
>>
>> By using the --support_datastore_emulator flag, dev_appserver will use 
>> Cloud Datastore Emulator for local datastore emulation. You can read more 
>> about the migration process here 
>> 
>> .
>> The development server and Cloud Datastore Emulator support the 
>> interoperation of ndb and Cloud Datastore client libraries. 
>>
>> Please help us test this feature. Our goal is to enable it by default in 
>> the future.
>> Please share your feedback by replying directly to this thread. We are 
>> looking forward to it!
>>
>> Thanks,
>> Steren
>> Product Manager
>> Google Cloud
>>
>
>
> 

-- 
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/6861774a-0d9f-4eac-82c3-5ad524c9e25f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: dev_appserver now compatible with Cloud Datastore Emulator.

2018-05-19 Thread &#x27;Kai Wang' via Google App Engine
Hi Viataly,

This change alone does not affect testbed.

But we do plan to allow testbed to use datastore emulator too. Please stay 
tuned :)

On Thursday, May 17, 2018 at 1:54:22 PM UTC-7, Vitaly Bogomolov wrote:
>
> Hi, Steren
>
> Our goal is to enable it by default in the future.
>>
>
> Good news.
>
> What about google.appengine.ext.testbed.init_datastore_v3_stub() ? Is it 
> also will be touched by these changes?
>
> WBR, Vitaly
>
>>

-- 
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/47736e39-53fb-4375-a3df-cbf42b9dba82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Issue with invalid SSL certificate

2018-01-22 Thread &#x27;Kai Wang' via Google App Engine
Cool.

By saying "have to roll revert back", do you mean this issue is already 
solved in your current version of cloud sdk, without swapping 
urlfetch_cacerts.txt ?

Thanks.

On Monday, January 22, 2018 at 6:07:50 AM UTC-8, Richard Cheesmar wrote:
>
> kai,
>
> I will have to revert back to the old certs to reproduce it, I'll try to 
> provide some more information sometime this week if possible.
>
>
>
> On Sunday, January 21, 2018 at 11:25:36 PM UTC+3, Kai Wang wrote:
>>
>> The gcloud version is pretty new. But these information is not enough for 
>> reproducing.
>>
>> If you are running the app with dev_appserver 
>> <https://cloud.google.com/appengine/docs/standard/python/tools/using-local-server>,
>>  
>> please *ATTACH A DEMO APP *for reproducing the issue.
>> If not, please also give a guide of reproducing it.
>>
>> Otherwise, without even a stacktrace, it is hard to understand how the 
>> following is triggered:
>>
>>   File "/usr/local/google_appengine/google/appengine/api/urlfetch.py", 
>> line 467, in _get_fetch_result
>> 'Invalid and/or missing SSL certificate for URL: ' + url)
>> SSLCertificateError: Invalid and/or missing SSL certificate for URL: 
>> https://accounts.google.com/o/oauth2/token
>>
>>
>> Your help will be sincerely appreciated.
>>
>>
>>
>>
>> On Saturday, January 20, 2018 at 12:05:56 PM UTC-8, Richard Cheesmar 
>> wrote:
>>>
>>> Hi, kai,
>>>
>>> Chezs-MacBook-Air:google_appengine chez$ gcloud version
>>> Google Cloud SDK 183.0.0
>>> app-engine-python 1.9.64
>>> beta 2017.09.15
>>> bq 2.0.27
>>> core 2017.12.08
>>> gcloud 
>>> gsutil 4.28
>>>
>>>
>>> Chezs-MacBook-Air:google_appengine chez$ openssl version
>>> OpenSSL 0.9.8zh 14 Jan 2016
>>>
>>>
>>>
>>> On Saturday, January 20, 2018 at 8:04:36 PM UTC+3, Kai Wang wrote:
>>>>
>>>> Hi Richard,
>>>>
>>>>  error on the local dev machine when using googlecloudstorage to write 
>>>>> a file:
>>>>
>>>>
>>>> Which development tool were you using?   Is it GAE's dev_appserver 
>>>> <https://cloud.google.com/appengine/docs/standard/python/tools/using-local-server>
>>>>  ?  
>>>> Is it gsutil <https://cloud.google.com/storage/docs/quickstart-gsutil> 
>>>> ? Or else?
>>>>
>>>>
>>>> I have some experience working on dev_appserver. AFAIK, apps running on 
>>>> dev_appserver have cloudstroage calls backed by a local fake. 
>>>> I found two docs mentioning dev_appserver with cloud storage [ 1 
>>>> <https://cloud.google.com/appengine/docs/standard/python/googlecloudstorageclient/app-engine-cloud-storage-sample>
>>>> , 2 
>>>> <https://cloud.google.com/appengine/docs/standard/python/googlecloudstorageclient/setting-up-cloud-storage>
>>>> ]
>>>>
>>>> Following the doc 1, I ran the attached demo app using dev_appserver.py;
>>>> And hit "localhost:8080" returns:
>>>>
>>>>
>>>> Demo GCS Application running from Version: None.873839430855777998
>>>>
>>>> Using bucket name: app_default_bucket
>>>>
>>>> Creating file /app_default_bucket/demo-testfile
>>>>
>>>>
>>>> To be close to your code snippet, I especially changed main.py line 88 
>>>> to:
>>>>
>>>> with cloudstorage.open(filename, 'w', 
>>>> content_type='binary/octet-stream', options={b'x-goog-acl': 
>>>> b'public-read'}) as f:
>>>>
>>>>
>>>> FYI, Digging into the urlfetch.py in our SDK, I found 
>>>> validate_certificate defaultly disabled.
>>>>
>>>>
>>>> For trouble shooting, please DO update this thread with as much input 
>>>> as possible. 
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thursday, January 4, 2018 at 5:04:40 AM UTC-8, Richard Cheesmar 
>>>> wrote:
>>>>>
>>>>> I'm getting the following error on the local dev machine when using 
>>>>> googlecloudstorage to write a file:
>>>>>
>>>>>   File "/usr/local/google_appengine/google/appengine/api/urlfetch.py", 
>>>>> line 467, in _get_fetch_result
>>>>> 'Invalid and/or missing SSL certificate for URL: ' + url)
>>>>> SSLCertificateError: Invalid and/or missing SSL certificate for URL: 
>>>>> https://accounts.google.com/o/oauth2/token
>>>>>
>>>>> import cloudstorage as gcs
>>>>>
>>>>> with gcs.open(filename, 'w', content_type=mime, options={b'x-goog-acl': 
>>>>> b'public-read'}) as f:
>>>>> f.write(img)
>>>>> f.close()
>>>>>
>>>>> This was working perfectly and there have not been any code changes.
>>>>> It also works on the live version. 
>>>>>
>>>>>
>>>>> Has anyone noticed the same?
>>>>>
>>>>>

-- 
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/6139c297-a900-4055-a083-a4185a789594%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Issue with invalid SSL certificate

2018-01-21 Thread &#x27;Kai Wang' via Google App Engine
The gcloud version is pretty new. But these information is not enough for 
reproducing.

If you are running the app with dev_appserver 
<https://cloud.google.com/appengine/docs/standard/python/tools/using-local-server>,
 
please *ATTACH A DEMO APP *for reproducing the issue.
If not, please also give a guide of reproducing it.

Otherwise, without even a stacktrace, it is hard to understand how the 
following is triggered:

  File "/usr/local/google_appengine/google/appengine/api/urlfetch.py", line 
467, in _get_fetch_result
'Invalid and/or missing SSL certificate for URL: ' + url)
SSLCertificateError: Invalid and/or missing SSL certificate for URL: 
https://accounts.google.com/o/oauth2/token


Your help will be sincerely appreciated.




On Saturday, January 20, 2018 at 12:05:56 PM UTC-8, Richard Cheesmar wrote:
>
> Hi, kai,
>
> Chezs-MacBook-Air:google_appengine chez$ gcloud version
> Google Cloud SDK 183.0.0
> app-engine-python 1.9.64
> beta 2017.09.15
> bq 2.0.27
> core 2017.12.08
> gcloud 
> gsutil 4.28
>
>
> Chezs-MacBook-Air:google_appengine chez$ openssl version
> OpenSSL 0.9.8zh 14 Jan 2016
>
>
>
> On Saturday, January 20, 2018 at 8:04:36 PM UTC+3, Kai Wang wrote:
>>
>> Hi Richard,
>>
>>  error on the local dev machine when using googlecloudstorage to write a 
>>> file:
>>
>>
>> Which development tool were you using?   Is it GAE's dev_appserver 
>> <https://cloud.google.com/appengine/docs/standard/python/tools/using-local-server>
>>  ?  
>> Is it gsutil <https://cloud.google.com/storage/docs/quickstart-gsutil> ? 
>> Or else?
>>
>>
>> I have some experience working on dev_appserver. AFAIK, apps running on 
>> dev_appserver have cloudstroage calls backed by a local fake. 
>> I found two docs mentioning dev_appserver with cloud storage [ 1 
>> <https://cloud.google.com/appengine/docs/standard/python/googlecloudstorageclient/app-engine-cloud-storage-sample>
>> , 2 
>> <https://cloud.google.com/appengine/docs/standard/python/googlecloudstorageclient/setting-up-cloud-storage>
>> ]
>>
>> Following the doc 1, I ran the attached demo app using dev_appserver.py;
>> And hit "localhost:8080" returns:
>>
>>
>> Demo GCS Application running from Version: None.873839430855777998
>>
>> Using bucket name: app_default_bucket
>>
>> Creating file /app_default_bucket/demo-testfile
>>
>>
>> To be close to your code snippet, I especially changed main.py line 88 to:
>>
>> with cloudstorage.open(filename, 'w', content_type='binary/octet-stream', 
>> options={b'x-goog-acl': b'public-read'}) as f:
>>
>>
>> FYI, Digging into the urlfetch.py in our SDK, I found 
>> validate_certificate defaultly disabled.
>>
>>
>> For trouble shooting, please DO update this thread with as much input as 
>> possible. 
>>
>> Thanks.
>>
>>
>>
>>
>>
>>
>>
>> On Thursday, January 4, 2018 at 5:04:40 AM UTC-8, Richard Cheesmar wrote:
>>>
>>> I'm getting the following error on the local dev machine when using 
>>> googlecloudstorage to write a file:
>>>
>>>   File "/usr/local/google_appengine/google/appengine/api/urlfetch.py", 
>>> line 467, in _get_fetch_result
>>> 'Invalid and/or missing SSL certificate for URL: ' + url)
>>> SSLCertificateError: Invalid and/or missing SSL certificate for URL: 
>>> https://accounts.google.com/o/oauth2/token
>>>
>>> import cloudstorage as gcs
>>>
>>> with gcs.open(filename, 'w', content_type=mime, options={b'x-goog-acl': 
>>> b'public-read'}) as f:
>>> f.write(img)
>>> f.close()
>>>
>>> This was working perfectly and there have not been any code changes.
>>> It also works on the live version. 
>>>
>>>
>>> Has anyone noticed the same?
>>>
>>>

-- 
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/99de95b6-60c1-470f-81bd-73b180d57829%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: [Google Cloud Insiders] Transitioning from Google App Engine SDK to gcloud, what to expect

2017-09-25 Thread &#x27;Kai Wang' via Google App Engine
Thanks for the transition doc. If you find any app engine SDK's feature
missing in gcloud, feel free to reach out to us!

+Patrick:

> Which App Engine language are you using?

Seems to be Python.

On Mon, Sep 25, 2017 at 6:35 AM, 'Patrick Flynn' via Google Cloud Insiders <
google-cloud-insid...@googlegroups.com> wrote:

> Hi Mariann,
>
> Which App Engine language are you using?
>
> Feel free to send me details about your migration issues and I'll see if I
> can route them to get them addressed.
>
>
> On Sun, Sep 24, 2017 at 5:16 PM, 'Mariann Nagy' via Google Cloud Insiders
>  wrote:
>
>> This is great! I once tried migrating from the SDK, but then I got upset
>> how difficult the process was and just ended up downloading the SDK again.
>> I'll read your summary on Monday. Thanks for sharing!
>>
>> On Sun, Sep 24, 2017 at 14:11 Alexey Maloletkin  wrote:
>>
>>> Great writing - thanks for sharing.
>>> Alexey
>>>
>>> On Sun, Sep 24, 2017 at 2:17 PM PK  wrote:
>>>
 A few months ago I had asked if anybody has attempted this and got no
 response. I finally made the transition; it was a bit bumpier than what I
 had hoped but it appears to be a good improvement on deployment times plus
 one less download to worry about.

 I wrote up my experience in a post here
  for anybody else
 interested in this.

 Best,
 PK
 www.gae123.com

 --
 You received this message because you are subscribed to the Google
 Groups "Google Cloud Insiders" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to google-cloud-insiders+unsubscr...@googlegroups.com.
 To post to this group, send email to google-cloud-insiders@googlegr
 oups.com.
 Visit this group at https://groups.google.com/grou
 p/google-cloud-insiders.
 To view this discussion on the web visit https://groups.google.com/d/ms
 gid/google-cloud-insiders/2C9E8B2B-6E4D-40F6-91E6-534830AE1E
 A7%40gae123.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google Cloud Insiders" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to google-cloud-insiders+unsubscr...@googlegroups.com.
>>> To post to this group, send email to google-cloud-insiders@googlegr
>>> oups.com.
>>> Visit this group at https://groups.google.com/grou
>>> p/google-cloud-insiders.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/google-cloud-insiders/CANNSRS114MaY5skqXUXL6qydtU7374%
>>> 3DgEmsWWhRRfvvJZseefw%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 Cloud Insiders" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-cloud-insiders+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-cloud-insiders@googlegr
>> oups.com.
>> Visit this group at https://groups.google.com/group/google-cloud-insiders
>> .
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/google-cloud-insiders/CAOwFNr5M1r36AUe%3D_2va%2B6McwpDy2
>> P68gRVXMbD82rnkJGrE9Q%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 Cloud Insiders" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-cloud-insiders+unsubscr...@googlegroups.com.
> To post to this group, send email to google-cloud-insiders@
> googlegroups.com.
> Visit this group at https://groups.google.com/group/google-cloud-insiders.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-cloud-insiders/CACr3Jy1QC4gNwUyrPaoFmts%2B2WdxvkGB34uM5X%
> 3DsD5AqZ80yzg%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] Re: Cron job runs successfully on local development server but fails after deployed

2017-09-08 Thread Kai Zhou
Thanks George! This is just the problem. 

在 2017年9月8日星期五 UTC+8上午1:46:49,George (Cloud Platform Support)写道:
>
> Hello Zhou, 
>
> None of your two projects seem to have a task queue; no queue is visible 
> in the Developers' Console.  Without a queue, you get the 
> "UnknownQueueError" error message. 
>
> You may try deploying the queue config explicitly 
> .
>  
> Otherwise you can use the gcould app deploy  
> command. 
>

-- 
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/a8b6e128-33eb-435a-b7b0-041e59b8f0a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Cron job runs successfully on local development server but fails after deployed

2017-09-07 Thread Kai Zhou
I include a cron job in my app. The following is the cron.yaml:
cron:
- description: monitor the spot every 60 seconds
  url: /task/cron
  schedule: every 1 minutes

And here is the handler for "/task/cron":
class CronHandler(webapp2.RequestHandler):
def get(self):
courses = Course.query().fetch()
for c in courses:
sub, num, sec=c.key.id().split(",")
task = taskqueue.add(url = '/task/monitor', 
queue_name='monitor-queue', params = {'sub':sub, 'num':num, 'sec':sec})

In the handler, a queue named "monitor-queue" is called. Here is my 
queue.yaml file:
queue:
- name: monitor-queue
  rate: 5/s
  bucket_size: 10

- name: notify-queue
  rate: 5/s
  bucket_size: 10

I ran my code in local development server successfully. But when I deploy 
my app, I get UnknownQueueError every time the cron job is executed. Here 
is a screenshot of the log:


Can anyone help me with this issue? Thanks!

-- 
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/7b605d27-fa7e-4d59-873d-19c24cabc35b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Help! I can't add my email account to Email API authorized senders.

2017-09-06 Thread Kai Zhou
But isn't that too limited? That way I can only send email with one address.

在 2017年9月7日星期四 UTC+8上午4:38:49,Shivam(Google Cloud Support)写道:
>
> If you hover over the question mark besides 'Email API authorized 
> senders', it says 'In most cases, users can only add themselves to this 
> list'. Try to login as that account and add the account. 
>
> On Wednesday, September 6, 2017 at 9:48:04 AM UTC-4, Kai Zhou wrote:
>>
>> I am trying to set up the email sending feature in google app engine. I 
>> want to send emails through the address associates with my domain 
>> admin@[mydomain].com. I try to edit the setting in the follow page:
>>
>>
>> <https://lh3.googleusercontent.com/-TBkm9ia-xJ0/Wa_6ntY1XdI/AAk/4OFkftJRgHoVRDajOdRv2dVWeHd3evIWQCLcBGAs/s1600/setting.png>
>> But when I click "save", nothing happens. And when I refresh the page, 
>> the email I add just disappears. Does anyone have the same issue? Does 
>> anybody know what is going on?
>>
>

-- 
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/177fdb3d-8392-430f-aa34-7a61e666ba19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Help! I can't add my email account to Email API authorized senders.

2017-09-06 Thread Kai Zhou


I am trying to set up the email sending feature in google app engine. I 
want to send emails through the address associates with my domain 
admin@[mydomain].com. I try to edit the setting in the follow page:


But when I click "save", nothing happens. And when I refresh the page, the 
email I add just disappears. Does anyone have the same issue? Does anybody 
know what is going on?

-- 
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/94c9e246-47a8-47ee-821a-69b5af35b9b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Problems with SSL on a custom domain

2015-08-21 Thread Kai van Duuren
We are having problems serving our web app on App Engine with SSL on a 
custom domain. We had followed the instructions for uploading a certificate 
to a custom domain via the admin console. This had been working without 
problems for several weeks, but since yesterday we have been observing some 
SSL connection errors.

Retrieving the main page from our location in the UK results in a 
connection error. Accessing via a proxy in San Fransisco loads the page 
without problem.

We have tried deleting and reinstalling the certificate via the admin 
console but this had no effect.

The url in question is https://dashboard.geospock.com

What could be causing this? Is this a routing issue internal to Google or 
could it be a configuration problem on our end?

Thanks.

-- 
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 http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e32f2dac-8998-4ba0-bb20-fdff811f718a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Launcher can't connect to App Engine servers

2013-01-23 Thread Kai Skye
My problem was that I had environment variables named `http_proxy` and 
`https_proxy` set that Python's urllib2 uses to route all connections 
through a proxy. Removing those environment variables fixes the issue.

On Wednesday, January 23, 2013 12:13:05 AM UTC-5, Kai Skye wrote:
>
> My website has been running fine for a month. There isn't anything 
> abnormal in the admin console or server logs. However, since early today, 
> whenever I try to deploy my website from Launcher, I receive this error:
>
> 12:03 AM Getting current resource limits.
> 2013-01-23 00:03:31,413 ERROR appcfg.py:2203 An error occurred processing 
> file '':  the target machine actively refused it>. Aborting. 
> Traceback (most recent call last):
>   File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 
> 171, in 
> run_file(__file__, globals())
>   File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 
> 167, in run_file
> execfile(script_path, globals_)
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4377
> , in 
> main(sys.argv)
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4368
> , in main
> result = AppCfgApp(argv).Run()
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2605
> , in Run
> self.action(self)
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4103
> , in __call__
> return method()
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3115
> , in Update
> self.UpdateVersion(rpcserver, self.basepath, appyaml)
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3097
> , in UpdateVersion
> return appversion.DoUpload(paths, openfunc)
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2173
> , in DoUpload
> self.resource_limits = GetResourceLimits(self.rpcserver, self.config)
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 358, 
> in GetResourceLimits
> resource_limits.update(GetRemoteResourceLimits(rpcserver, config))
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 329, 
> in GetRemoteResourceLimits
> version=config.version)
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py",line 
> 391, in Send
> f = self.opener.open(req)
>   File "C:\Python27\lib\urllib2.py", line 400, in open
> response = self._open(req, data)
>   File "C:\Python27\lib\urllib2.py", line 418, in _open
> '_open', req)
>   File "C:\Python27\lib\urllib2.py", line 378, in _call_chain
> result = func(*args)
>   File "C:\Python27\lib\urllib2.py", line 1215, in https_open
> return self.do_open(httplib.HTTPSConnection, req)
>   File "C:\Program Files 
> (x86)\Google\google_appengine\lib\fancy_urllib\fancy_urllib\__init__.py",line 
> 383, in do_open
> raise url_error
> urllib2.URLError:  made because the target machine actively refused it>
> 2013-01-23 00:03:31 (Process exited with code 1)
>
> In fact, I can't even run the Help -> Check For Updates... in Launcher 
> without receiving these warnings:
>
> Cannot perform proper version check.
> cannot_contact_server
> release: "1.7.4"
> timestamp: 1352314290
> api_versions: ['1']
>
> I had a friend test on a different computer, using the Mac client, and he 
> had the same problem. Is anybody else having this issue, or know a solution 
> to this issue?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/ttu0b3Q5hjcJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Launcher can't connect to App Engine servers

2013-01-22 Thread Kai Skye
My website has been running fine for a month. There isn't anything abnormal 
in the admin console or server logs. However, since early today, whenever I 
try to deploy my website from Launcher, I receive this error:

12:03 AM Getting current resource limits.
2013-01-23 00:03:31,413 ERROR appcfg.py:2203 An error occurred processing 
file '': . Aborting. 
Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 171, 
in 
run_file(__file__, globals())
  File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 167, 
in run_file
execfile(script_path, globals_)
  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4377, 
in 
main(sys.argv)
  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4368, 
in main
result = AppCfgApp(argv).Run()
  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2605, 
in Run
self.action(self)
  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 4103, 
in __call__
return method()
  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3115, 
in Update
self.UpdateVersion(rpcserver, self.basepath, appyaml)
  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 3097, 
in UpdateVersion
return appversion.DoUpload(paths, openfunc)
  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 2173, 
in DoUpload
self.resource_limits = GetResourceLimits(self.rpcserver, self.config)
  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 358, 
in GetResourceLimits
resource_limits.update(GetRemoteResourceLimits(rpcserver, config))
  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\tools\appcfg.py", line 329, 
in GetRemoteResourceLimits
version=config.version)
  File "C:\Program Files 
(x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py",line 
391, in Send
f = self.opener.open(req)
  File "C:\Python27\lib\urllib2.py", line 400, in open
response = self._open(req, data)
  File "C:\Python27\lib\urllib2.py", line 418, in _open
'_open', req)
  File "C:\Python27\lib\urllib2.py", line 378, in _call_chain
result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 1215, in https_open
return self.do_open(httplib.HTTPSConnection, req)
  File "C:\Program Files 
(x86)\Google\google_appengine\lib\fancy_urllib\fancy_urllib\__init__.py",line 
383, in do_open
raise url_error
urllib2.URLError: 
2013-01-23 00:03:31 (Process exited with code 1)

In fact, I can't even run the Help -> Check For Updates... in Launcher 
without receiving these warnings:

Cannot perform proper version check.
cannot_contact_server
release: "1.7.4"
timestamp: 1352314290
api_versions: ['1']

I had a friend test on a different computer, using the Mac client, and he 
had the same problem. Is anybody else having this issue, or know a solution 
to this issue?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/KErx8gU0WD8J.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: GAE 1.6 can not find python2.7 in Mac OSX 10.7.2

2011-11-08 Thread Kai
This issue has been opened here:
http://code.google.com/p/google-appengine-mac-launcher/issues/detail?id=4

Hit the "Enter" key in the text field will solve this problem.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/Dt5kKvhOm9gJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: GAE 1.6 can not find python2.7 in Mac OSX 10.7.2

2011-11-08 Thread Kai
Thank you for providing the information.
I tried python 2.7.1 which is bundled with Lion.
Although, this problem is not quite annoying because I can run
dev_appserver.py command in terminal to avoid the warning message.

On Nov 9, 12:18 am, Droid  wrote:
> I installed the python 2.7.2 dmg today 0n MacBook Air Lion 10.7.2 - I
> just let it install itself.
> Then I checked in a terminal window >python -v
> Result fine, it showed python 2.72.
>
> Then I downloaded the GAE 1.6 dmg and let that install itself too.
>
> Result - All OK (I assume my new GAE is running on python 2.72!!)
>
> I  am very happy with how easy it was.
>
> On Nov 8, 3:40 pm, Kai  wrote:
>
>
>
>
>
>
>
> > GAE in my Mac OSX 10.7.2 system was updated to 1.6.0 by its auto-updater.
> > In the GoogleAppEngineLauncher, I have changed the "Python Path" to
> > "/usr/bin/python2.7" from the Preferences, the logs display that the GAE
> > still run in python2.6.
>
> > Here are the Logs:
>
> > *** Running dev_appserver with the following flags:
>
> >     --admin_console_server= --port=8080
>
> > Python command: /usr/bin/python2.6
>
> > WARNING  2011-11-08 15:21:42,915 rdbms_mysqldb.py:90] The rdbms API is not
> > available because the MySQLdb library could not be loaded.
>
> > Warning: You are using a Python runtime (2.6) that is older than the
> > production runtime environment (2.7). Your application may be dependent on
> > Python behaviors that have changed and may not work correctly when deployed
> > to production.
>
> > WARNING  2011-11-08 15:21:43,115 dev_appserver.py:3254] Could not
> > initialize images API; you are likely missing the Python "PIL" module.
> > ImportError: No module named _imaging
>
> > INFO     2011-11-08 15:21:43,124 dev_appserver_multiprocess.py:637] Running
> > application dev~surfingstudio on port 8080:http://localhost:8080

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: GAE 1.6 can not import module jinja2

2011-11-08 Thread Kai
Thank you, Matt and Brian.
Actually, I have not installed jinja2 in my system. I will try to
fixed this minor issue and finish the tutorial guild. :)

On Nov 9, 7:39 am, Brian Quinlan  wrote:
> As Matt says, you need to install jinja2 on your local Python instance.
>
> This will be fixed in a future release.
>
> Cheers,
> Brian
>
>
>
>
>
>
>
> On Wed, Nov 9, 2011 at 7:45 AM, NG  wrote:
> > Same here
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/google-appengine/-/BDGGzz0ahFMJ.
> > To post to this group, send email to google-appengine@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] GAE 1.6 can not import module jinja2

2011-11-08 Thread Kai
I am trying my first python2.7 GAE apps. Everything goes smoothly in the 
GAE python2.7 Getting Started guild, except the chapter Using Templates.
http://code.google.com/appengine/docs/python/gettingstartedpython27/templates.html

I have added the lines in my app.yaml:

libraries:
- name: jinja2
  version: latest


I have also changed my helloworld.py to import jinja2 module.
And errors:
ERROR2011-11-08 15:01:12,371 wsgi.py:170] 
Traceback (most recent call last):
  File 
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py",
 
line 168, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
  File 
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py",
 
line 206, in _LoadHandler
handler = __import__(path[0])
  File 
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py",
 
line 640, in Decorate
return func(self, *args, **kwargs)
  File 
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py",
 
line 1756, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
  File 
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py",
 
line 640, in Decorate
return func(self, *args, **kwargs)
  File 
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py",
 
line 1628, in FindAndLoadModule
description)
  File 
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py",
 
line 640, in Decorate
return func(self, *args, **kwargs)
  File 
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_import_hook.py",
 
line 1571, in LoadModuleRestricted
description)
  File "/Users/kai/Documents/AppEngine/helloworld/helloworld.py", line 1, 
in 
import jinja2
ImportError: No module named jinja2

How can I use jjinja2 template engine in the GAE 1.6 SDK?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/bQBghm-hawAJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] GAE 1.6 can not find python2.7 in Mac OSX 10.7.2

2011-11-08 Thread Kai
GAE in my Mac OSX 10.7.2 system was updated to 1.6.0 by its auto-updater. 
In the GoogleAppEngineLauncher, I have changed the "Python Path" to 
"/usr/bin/python2.7" from the Preferences, the logs display that the GAE 
still run in python2.6.

Here are the Logs:

*** Running dev_appserver with the following flags:

--admin_console_server= --port=8080

Python command: /usr/bin/python2.6

WARNING  2011-11-08 15:21:42,915 rdbms_mysqldb.py:90] The rdbms API is not 
available because the MySQLdb library could not be loaded.

Warning: You are using a Python runtime (2.6) that is older than the 
production runtime environment (2.7). Your application may be dependent on 
Python behaviors that have changed and may not work correctly when deployed 
to production.

WARNING  2011-11-08 15:21:43,115 dev_appserver.py:3254] Could not 
initialize images API; you are likely missing the Python "PIL" module. 
ImportError: No module named _imaging

INFO 2011-11-08 15:21:43,124 dev_appserver_multiprocess.py:637] Running 
application dev~surfingstudio on port 8080: http://localhost:8080



-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/7a8Os5FRYVUJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Failed to run grails test-app -unit

2010-09-06 Thread Hu Kai
Everytime I run grails test-app -unit I got following the stacktrace I
attached, but app can be successfully deployed on google app

My peristence.xml is this :


http://java.sun.com/xml/ns/persistence";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
version="1.0">


 
org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider










Any idea about this?


=StackTrace=


[enhance] org.datanucleus.exceptions.NucleusUserException: Class
"transactions-optional" found to be part of persistence-unit "{1}" so
loading it in case it is persistable
  [enhance] at
org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:
787)
  [enhance] at
org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:
802)
  [enhance] at
org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:
545)
  [enhance] at
org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:
1252)
  [enhance] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
  [enhance] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
  [enhance] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
  [enhance] at java.lang.reflect.Method.invoke(Method.java:597)
  [enhance] at
com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:57)
  [enhance] at
com.google.appengine.tools.enhancer.Enhance.(Enhance.java:60)
  [enhance] at
com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41)
  [enhance] Caused by:
org.datanucleus.exceptions.ClassNotResolvedException: Class "WEB-
INF.classes.com.iretro.data.Retro" was not found in the CLASSPATH.
Please check your specification and your CLASSPATH.
  [enhance] at
org.datanucleus.JDOClassLoaderResolver.classForName(JDOClassLoaderResolver.java:
250)
  [enhance] at
org.datanucleus.JDOClassLoaderResolver.classForName(JDOClassLoaderResolver.java:
415)
  [enhance] at
org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:
767)
  [enhance] ... 10 more
  [enhance] Nested Throwables StackTrace:
  [enhance] Class "WEB-INF.classes.com.iretro.data.Retro" was not
found in the CLASSPATH. Please check your specification and your
CLASSPATH.
  [enhance] org.datanucleus.exceptions.ClassNotResolvedException:
Class "WEB-INF.classes.com.iretro.data.Retro" was not found in the
CLASSPATH. Please check your specification and your CLASSPATH.
  [enhance] at
org.datanucleus.JDOClassLoaderResolver.classForName(JDOClassLoaderResolver.java:
250)
  [enhance] at
org.datanucleus.JDOClassLoaderResolver.classForName(JDOClassLoaderResolver.java:
415)
  [enhance] at
org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:
767)
  [enhance] at
org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:
802)
  [enhance] at
org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:
545)
  [enhance] at
org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:
1252)
  [enhance] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
  [enhance] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
  [enhance] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
  [enhance] at java.lang.reflect.Method.invoke(Method.java:597)
  [enhance] at
com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:57)
  [enhance] at
com.google.appengine.tools.enhancer.Enhance.(Enhance.java:60)
  [enhance] at
com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:41)
  [enhance] Class "WEB-
INF.classes.org.grails.spring.scope.PrototypeScopeMetadataResolver"
was not found in the CLASSPATH. Please check your specification and
your CLASSPATH.
  [enhance] org.datanucleus.exceptions.ClassNotResolvedException:
Class "WEB-
INF.classes.org.grails.spring.scope.PrototypeScopeMetadataResolver"
was not found in the CLASSPATH. Please check your specification and
your CLASSPATH.
  [enhance] at
org.datanucleus.JDOClassLoaderResolver.classForName(JDOClassLoaderResolver.java:
250)
  [enhance] at
org.datanucleus.JDOClassLoaderResolver.classForName(JDOClassLoaderResolver.java:
415)
  [enhance] at
org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:
767)
  [enhance] at
org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:
802)
  [enhance] at
org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:
545)
  [enhance] at
org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucle

[google-appengine] Re: appcfg.py update_cron Server Error (500)

2009-04-17 Thread Kai

Thank for your reply, Anthony

Definitely, the name of my app begins with a digit. OK, I will wait
for next
release.

On Apr 17, 1:08 pm, Anthony  Baxter  wrote:
> Does your appid begin with a digit? Turns out I found a bug in cron
> that means the upload breaks in that case. A fix should be out next
> week, I hope.
>
> Anthony
>
> On Apr 16, 1:33 am, Kai  wrote:
>
> > I am testing my new GAE app with thecronjob functionality.
> > Everything works fine in my local SDK environment.
> > But when updating my python code to GAE server,
> > the error occur:
>
> > Uploadingcronentries.
> > Error 500: --- begin server output ---
>
> > Server Error (500)
> > A server error has occurred.
> > --- end server output ---
>
> > Any clue?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] appcfg.py update_cron Server Error (500)

2009-04-15 Thread Kai

I am testing my new GAE app with the cron job functionality.
Everything works fine in my local SDK environment.
But when updating my python code to GAE server,
the error occur:

Uploading cron entries.
Error 500: --- begin server output ---

Server Error (500)
A server error has occurred.
--- end server output ---

Any clue?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---