Error: 'ascii' codec can't decode byte 0xe2 in position 25: ordinal not in range(128)

2,520 views
Skip to first unread message

h...@brettpeary.com

unread,
Jun 6, 2018, 9:03:53 AM6/6/18
to Google App Engine
I've deployed this app several time, but now for some reason I am getting this error when deploying now. Any help would be appreciated. 

Error:
ERROR: gcloud crashed (UnicodeDecodeError): 'ascii' codec can't decode byte 0xe2 in position 25: ordinal not in range(128)



This is on version 204.0.0. 


The app is Wordpress, which has translation files with non-ascii characters, but none of the file names are non-ascii, as far as I can see. 

Other information:
Trace:
/Users/b_d_m_p/google-cloud-sdk/gcloud_main.py:144
 gcloud_cli
.Execute()
/Users/b_d_m_p/google-cloud-sdk/calliope/cli.py:870
 
self._HandleAllErrors(exc, command_path_string, specified_arg_names)
/Users/b_d_m_p/google-cloud-sdk/calliope/cli.py:908
 exceptions
.HandleError(exc, command_path_string, self.__known_error_handler)
/Users/b_d_m_p/google-cloud-sdk/calliope/exceptions.py:526
 core_exceptions
.reraise(exc)
/Users/b_d_m_p/google-cloud-sdk/core/exceptions.py:111
 six
.reraise(type(exc_value), exc_value, tb)
/Users/b_d_m_p/google-cloud-sdk/calliope/cli.py:844
 resources
= calliope_command.Run(cli=self, args=args)
/Users/b_d_m_p/google-cloud-sdk/calliope/backend.py:756
 resources
= command_instance.Run(args)
surface
/app/deploy.py:85
 parallel_build
=False)
/Users/b_d_m_p/google-cloud-sdk/command_lib/app/deploy_util.py:583
 flex_image_build_option
=flex_image_build_option)
/Users/b_d_m_p/google-cloud-sdk/command_lib/app/deploy_util.py:385
 flex_image_build_option
)
/Users/b_d_m_p/google-cloud-sdk/command_lib/app/deploy_util.py:332
 service_info
, source_dir, code_bucket_ref)
/Users/b_d_m_p/google-cloud-sdk/api_lib/app/deploy_app_command_util.py:309
 _UploadFilesThreads
(files_to_upload, bucket_ref)
/Users/b_d_m_p/google-cloud-sdk/api_lib/app/deploy_app_command_util.py:258
 show_progress_bar
=True)
/Users/b_d_m_p/google-cloud-sdk/command_lib/storage/storage_parallel.py:146
 show_progress_bar
)
/Users/b_d_m_p/google-cloud-sdk/command_lib/storage/storage_parallel.py:126
 pool
.Map(method, zip(tasks, itertools.cycle((callback,))))
/Users/b_d_m_p/google-cloud-sdk/core/util/parallel.py:98
 
return self.MapAsync(func, iterable).Get()
/Users/b_d_m_p/google-cloud-sdk/core/util/parallel.py:126
 
return self.GetResult().GetOrRaise()
/Users/b_d_m_p/google-cloud-sdk/core/util/parallel.py:163
 
raise self.error  # pylint: disable=raising-bad-type
MultiError: One or more errors occurred:




Installation information:


Google Cloud SDK [198.0.0]


Platform: [Mac OS X, x86_64] ('Darwin', 'bdmpmbp15.local', '17.4.0', 'Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64', 'x86_64', 'i386')
Python Version: [2.7.14 (default, Jan  4 2018, 13:59:30)  [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]]
Python Location: [/usr/local/Cellar/python/2.7.14_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python]
Site Packages: [Disabled]


Installation Root: [${HOME}/google-cloud-sdk]
Installed Components:
  core
: [2018.04.13]
  app
-engine-python: [1.9.69]
  app
-engine-python-extras: [1.9.69]
  app
-engine-php: [ ]
  gsutil
: [4.30]
  bq
: [2.0.32]
System PATH: [${HOME}/google-cloud-sdk/bin:${HOME}/google-cloud-sdk/platform/google_appengine/google/tools/appcfg.py:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]
Python PATH: [${HOME}/google-cloud-sdk/lib/third_party:${HOME}/google-cloud-sdk/lib:/usr/local/Cellar/python/2.7.14_1/Frameworks/Python.framework/Versions/2.7/lib/python27.zip:/usr/local/Cellar/python/2.7.14_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7:/usr/local/Cellar/python/2.7.14_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin:/usr/local/Cellar/python/2.7.14_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac:/usr/local/Cellar/python/2.7.14_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages:/usr/local/Cellar/python/2.7.14_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk:/usr/local/Cellar/python/2.7.14_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old:/usr/local/Cellar/python/2.7.14_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload]
Cloud SDK on PATH: [False]
Kubectl on PATH: [False]


Installation Properties: [${HOME}/google-cloud-sdk/properties]
User Config Directory: [${CLOUDSDK_CONFIG}]
Active Configuration Name: [default]
Active Configuration Path: [${CLOUDSDK_CONFIG}/configurations/config_default]


Account: [b..y@g..m]
Project: [g..v]


Current Properties:
 
[core]
    project
: [g..v]
    account
: [b..y@g..m]
    disable_usage_reporting
: [False]
 
[compute]
    region
: [asia-northeast1]
    zone
: [asia-northeast1-a]


Logs Directory: [${CLOUDSDK_CONFIG}/logs]
Last Log File: [${CLOUDSDK_CONFIG}/logs/2018.06.06/14.47.06.744768.log]


git
: [git version 2.15.1 (Apple Git-101)]
ssh
: [OpenSSH_7.6p1, LibreSSL 2.6.2]







Katayoon (Cloud Platform Support)

unread,
Jun 6, 2018, 3:16:28 PM6/6/18
to Google App Engine
The issue is due to there being a Unicode character located in either one of your project file paths or app.yaml configuration file and already reported to the Cloud SDK team. I see that you have Cloud SDK version 198.0.0 in your installation information, though you mentioned using version 204.0.0. So, I recommend that you update your Cloud SDK to the latest version by running the “gcloud components update” command and remove non-ascii characters from your project file paths or app.yaml. If the issue persists, you may create a report in the Issue Tracker so that we would be able to dig into the issue there.

h...@brettpeary.com

unread,
Jun 6, 2018, 9:45:14 PM6/6/18
to Google App Engine
I'm sorry that was a copy and paste error. It was 204.0.0 when I had this problem. 

I understand that it is caused by a unicode character, but nothing appears in app.yaml or any file names, so I am a bit confused. Could a space from Japanese input cause this? Japanese has been used in the project but there is not any visible in the app.yaml file. 

Also, would this suddenly start happening even though I have deployed the app several times previously. I made no changes to the app.yaml file or file names since the last commit. All I did was add one line in an api controller and upgrade to 204.0.0 

George (Cloud Platform Support)

unread,
Jun 7, 2018, 5:18:37 PM6/7/18
to google-a...@googlegroups.com
If your project contains so many file paths, as the reference to Wordpress seems to indicate, you might have overseen one file name containing a non-ASCII character. If you are sure that no such character is present neither in paths, file names, nor app.yaml, it is worthwhile opening an issue in the public issue tracker

h...@brettpeary.com

unread,
Jun 7, 2018, 10:17:55 PM6/7/18
to Google App Engine
Ok, thank you. I did. 

h...@brettpeary.com

unread,
Jun 8, 2018, 2:50:11 AM6/8/18
to Google App Engine
Further information: 


And I've been trying troubleshoot the issue and had the following results. 

So, I made a test project with a blank wordpress app and a new yaml file and deployed it. It did not stop immediately like it has been with the ascii error, but it did give me a timeout error, which I would get 4 out of 5 times when the app was deploying. 

Since it didn't get an ascii error, I took the contents of the app.yaml file and pasted it in the new test instance. That also did not give me an ascii error on deploy, but did get the timeout error. 

Since that did not hang on an ascii error, I thought it was not my original app.yaml file that was the issue, which made me think that it was an issue in the project file name or something, so I took the contents of the new yaml file and tried to deployed my original app with that, and that also did not hang on an ascii file but did get the timeout error. 

So, I don't know what is causing the timeout error, but it appears that the ascii problem is not my original app.yaml file nor is it a file name in my project, but something is happening when they are deployed together. I'm quite confused. 

h...@brettpeary.com

unread,
Jun 8, 2018, 3:11:07 AM6/8/18
to Google App Engine
I have been able to make the ascii error go away by removing these lines...

```
skip_files:
- ^(.*/)?\.zip$
- ^(.*/)?\.bat$
- ^(.*/)?\.sh$
- ^(.*/)?\.md$
```

I am not sure why this would be causing the issue. None of those items showed up when I did a regex search across my project for non-ascii characters. 

Also, I am not sure why I was able to start the deploy and not get the ascii error in the text project, as this text was in the app.yaml file at the time of testing. 

h...@brettpeary.com

unread,
Jun 8, 2018, 3:44:56 AM6/8/18
to Google App Engine
I managed to stop the ascii error, but I am getting this error every time now. I am not sure if they are related...

Beginning deployment of service [default]...
Some files were skipped. Pass `--verbosity=info` to see which ones.
You may also view the gcloud log file, found at
[/Users/me/.config/gcloud/logs/2018.06.08/16.12.18.352564.log].
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 1 file to Google Cloud Storage                 ═╣
╚════════════════════════════════════════════════════════════╝
ERROR: gcloud crashed (MultiError): One or more errors occurred:
MaxRetrialsException: last_result=(None, (<class 'socket.error'>, error(60, 'Operation timed out'), <traceback object at 0x10de05908>)), last_retrial=3, time_passed_ms=1188103,time_to_wait=0


George (Cloud Platform Support)

unread,
Jun 8, 2018, 12:12:52 PM6/8/18
to google-a...@googlegroups.com
This new type of error that you notice after fixing the ASCII-related one warrants the opening of a new issue in the public tracker. It is too soon to say that the new error is related to the previous one. Only a new, dedicated investigation can address it.  
Reply all
Reply to author
Forward
0 new messages