As shown in the Local Development Server Options <https://cloud.google.com/appengine/docs/legacy/standard/python/tools/local-devserver-command> documentation:
Python 2 is no longer supported by the community. We recommend that you migrate Python 2 apps to Python 3. — About Python 2 support <https://cloud.google.com/python/docs/python2-sunset> in Google Cloud: The Python community announced that it will sunset Python 2 <https://www.python.org/doc/sunset-python-2/> on January 1, 2020, and are encouraging all developers to upgrade to Python 3 as soon as they can. In recognition that customers may need more time to migrate from Python 2 to Python 3, Google Cloud customers will be able to run Python 2 apps and use existing Python 2 client libraries <https://github.com/googleapis/google-cloud-python#google-cloud-python-client> after January 1, 2020. Managed compute services, such as App Engine, will continue to provide a Python 2 runtime beyond January 1, 2020. Python 2 client libraries will continue to be available for download, but future major releases will only target Python 3. — Google Cloud CLI <https://cloud.google.com/python/docs/python2-sunset#cloud-sdk> Google Cloud CLI version 274.0.0 <https://cloud.google.com/sdk/docs/release-notes#27400_2019-12-17> introduces support for Python 3. Older versions of the gcloud CLI will remain available for download <https://cloud.google.com/sdk/docs/downloads-versioned-archives>, but we recommend using version 274.0.0 or newer and migrating to Python 3 as soon as possible. — The best way to report this kind of issues is with issue tracker as you have done: - https://issuetracker.google.com/242384115 — About Issue reports <https://cloud.google.com/support/docs/issue-trackers#issue_reports>: Google reviews every new issue report submitted by users. Sometimes one of our staff will ask for clarification or followup. After we're able to replicate the issue, we'll tell you that it's been forwarded to the appropriate team. Depending on the circumstances, we may be able to provide periodic updates while an issue is being looked at, but usually we cannot provide too many specifics about the exact cause of an issue, or when it will be fixed. When we've fixed an issue in production, we'll indicate this and then we'll close the issue. If you need further assistance, you can create a Support case <https://cloud.google.com/support-hub>. On Monday, August 15, 2022 at 10:37:15 AM UTC-5 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=<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]ERROR 2022-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/1ca303e0-aed4-46ef-a259-1ba623cc5a9bn%40googlegroups.com.