[google-appengine] Re: Local Development server when opening "Datastore Viewer"

2022-08-31 Thread limin xiao
Had the same issue, but ver. 340.0.0 was proved fine.

On Tuesday, August 16, 2022 at 12:37:15 AM UTC+9 khaled@gmail.com wrote:

> So I moved to ver. 270.0.0 indeed the problem has gone, which indicates 
> that there was some string/unicode/ascii related update along the way that 
> may have broken its ability to handle Unicode characters. I also tried 
> versions 396, 383, 380 all had the same problem and error output. 
>
> If someone can look into this so that we can work with the latest Google 
> Cloud CLI versions, it would be great!
>
> Have a nice day,
> Khaled
>
> On Friday, August 12, 2022 at 11:56:30 PM UTC+2 Khaled Wagdy wrote:
>
>> Hello, 
>>
>> I am using Python 2.7 on AppEngine and Datastore. I moved my code & test 
>> database file to another laptop, I also made a fresh install of gcloud 
>> components, currently at version 397.0.0.
>>
>> Ever since then, trying to access local datastore viewer "
>> http://localhost:8000/datastore?kind=" from the browser causes as 
>> ascii error as seen in the screenshot below and server output. I have some 
>> Arabic content in the DB, but on the old laptop which was running an old 
>> gcloud components version (270.0.0) there was no problem browsing through 
>> the entities.
>>
>> I will try to install the old version 270.0.0 using the command *gcloud 
>> components update --version 270.0.0* and see if that resolves it. But I 
>> would think working on the latest version is best in case something can be 
>> fixed to resolve this matter.
>>
>> Has there been a breaking update in the local development server and/or 
>> datastore emulator that might have been causing this issue? Is there a way 
>> around this ascii error to be able to browse through the local DB entities 
>> without problems? This is important during debugging, and can save a lot of 
>> time.
>>
>> [image: Screen Shot 2022-08-12 at 18.02.18.png]ERROR2022-08-12 
>> 16:05:04,764 webapp2.py:1553] 'ascii' codec can't encode characters in 
>> position 0-3: ordinal not in range(128)
>> Traceback (most recent call last):
>>   File 
>> "/Users/khaled/Documents/darna/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.1/webapp2.py",
>>  
>> line 1536, in __call__
>> rv = self.handle_exception(request, response, e)
>>   File 
>> "/Users/khaled/Documents/darna/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.1/webapp2.py",
>>  
>> line 1530, in __call__
>> rv = self.router.dispatch(request, response)
>>   File 
>> "/Users/khaled/Documents/darna/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.1/webapp2.py",
>>  
>> line 1278, in default_dispatcher
>> return route.handler_adapter(request, response)
>>   File 
>> "/Users/khaled/Documents/darna/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.1/webapp2.py",
>>  
>> line 1102, in __call__
>> return handler.dispatch()
>>   File 
>> "/Users/khaled/Documents/darna/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/admin/admin_request_handler.py",
>>  
>> line 88, in dispatch
>> super(AdminRequestHandler, self).dispatch()
>>   File 
>> "/Users/khaled/Documents/darna/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.1/webapp2.py",
>>  
>> line 572, in dispatch
>> return self.handle_exception(e, self.app.debug)
>>   File 
>> "/Users/khaled/Documents/darna/google-cloud-sdk/platform/google_appengine/lib/webapp2-2.5.1/webapp2.py",
>>  
>> line 570, in dispatch
>> return method(*args, **kwargs)
>>   File 
>> "/Users/khaled/Documents/darna/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/admin/datastore_viewer.py",
>>  
>> line 674, in get
>> start))
>>   File 
>> "/Users/khaled/Documents/darna/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/admin/datastore_viewer.py",
>>  
>> line 625, in _get_entity_template_data
>> value = data_type.format(raw_value)
>>   File 
>> "/Users/khaled/Documents/darna/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/admin/datastore_viewer.py",
>>  
>> line 200, in format
>> return str(value)
>> UnicodeEncodeError: 'ascii' codec can't encode characters in position 
>> 0-3: ordinal not in range(128)
>>
>> Thank you,
>> Khaled
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/dbcb3642-a93f-4988-b786-1243441b19bfn%40googlegroups.com.


[google-appengine] Keep getting TransientError when call lease_tasks() to pull from Cloud Tasks

2020-03-09 Thread limin xiao


Beginning from sometime slightly before 10:28 Feb 24, 2019(UTC), suddenly 
my app started to constantly get TransientError when trying to pull tasks 
from task queue.

Since the same piece of code worked stably for more than 2 years and there 
was no new deployment over the project around that time, I believe someone 
screwed up at the back end.


I hoped Google could quickly note the error and fix it as they always did.

However, 10 days passed and the error still exists.

Can someone help to check what happened?

 

My project runs on App Engine Standard Environment, Python 2.7 runtime.

Here is the printed trace for Exception.

#Again, the same code worked for years and we did no change before the 
error begins to show up.

 
File 
"/base/alloc/tmpfs/dynamic_runtimes/python27g/ebb3af67a06047b6/python27/python27_lib/versions/1/google/appengine/api/taskqueue/taskqueue.py"
, line 1897, in lease_tasks
 return rpc.get_result()

File 
"/base/alloc/tmpfs/dynamic_runtimes/python27g/ebb3af67a06047b6/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py"
, line 615, in get_result
 return self.__get_result_hook(self)

File 
"/base/alloc/tmpfs/dynamic_runtimes/python27g/ebb3af67a06047b6/python27/python27_lib/versions/1/google/appengine/api/taskqueue/taskqueue.py"
, line 1809, in ResultHook
raise _TranslateError(e.application_error, e.error_detail)

TransientError



-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/2e8fb7bf-c02c-40e9-9b77-9880e2c681fe%40googlegroups.com.


[google-appengine] Mail quota get exhausted at beginning of day

2018-09-10 Thread limin xiao
Beginning from Sep 05, 2018, the “Recipients Emailed” quota of my app, 
which was 100/day, get exhausted at beginning of each day.
It exhausts even if I didn’t send a single mail (I am sure about that 
because I only use it send mails to myself when caught errors). 

Is the mail API totally shutdown?  I didn’t find any announcement about 
this change.

My app runs on Python 2.7

-- 
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/51d48450-20ba-474e-af30-226b665ebfdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Re: Why is sys.float_repr_style configured as "legacy"

2018-08-17 Thread limin xiao
Thank you for prompt response. Waiting for good news.

On Friday, August 17, 2018 at 7:16:14 AM UTC+9, Katayoon (Cloud Platform 
Support) wrote:
>
> Hi Limin,
>
> I reproduced the issue and as you mentioned, I see different behaviors 
> when I run it in Cloud Shell and when I deploy the app in App Engine. It 
> seems like a bug. So, I created a report in the Issue Tracker 
>  so that the issue be 
> investigated by the Cloud App Engine team. You may star the report 
> for all further updates.
>

-- 
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/e48335e0-6223-49db-ae53-c2cadc49d2f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[google-appengine] Why is sys.float_repr_style configured as "legacy"

2018-08-16 Thread limin xiao
I just found sys.float_repr_style is configured as "legacy" in Python 2.7 
runtime of GAE.
Which may be a surprise for most users.

The full discussion can be found here.
https://stackoverflow.com/questions/51851578/why-does-reprfloat-return-more-digits-on-google-app-engine-than-others

Is there any strong motivation to set "legacy" other than "short"?

For me I have at lease 3 reasons to sit with "short"
1. To keep consistent with other platforms. (Python 2.7 default is "short")
2. To keep consistent with SDK
3. To get shorter string when dumps to json.

Actually the 3rd one makes most sense for me.

-- 
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/23b614e0-fa71-42f6-801b-9b6898396fb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.