Kyle Cannon
Kyle Cannon

Reputation: 91

Google SDK gcloud crashed (UnicodeDecodeError): 'utf8' codec can't decode byte 0xf8 in position 29: invalid start byte

When trying to run gcloud app deploy, I'm getting the error:

gcloud crashed (UnicodeDecodeError): 'utf8' codec can't decode byte 0xf8 in position 29: invalid start byte

I have no clue whats happening with it. Works fine in my local server.

The full error is:

Updating service [default]...DEBUG: Converted YAML to JSON: "{
  "handlers": [
{
  "securityLevel": "SECURE_OPTIONAL",
  "staticFiles": {
    "path": "static/static_files/\\1",
    "uploadPathRegex": "static/static_files/.*"
  },
  "urlRegex": "/static/(.*)"
},
{
  "script": {
    "scriptPath": "Bctpython.wsgi.application"
  },
  "securityLevel": "SECURE_OPTIONAL",
      "urlRegex": "/.*"
    }
     ],
    "libraries": [
    {
      "name": "MySQLdb",
      "version": "1.2.5"
    }
       ],
      "runtime": "python27",
      "threadsafe": true
    }"
    Updating service [default]...failed.
    DEBUG: 'utf8' codec can't decode byte 0xf8 in position 29: invalid start byte
    Traceback (most recent call last):
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 798, in Execute
    resources = args.calliope_command.Run(cli=self, args=args)
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 871, in Run
    resources = command_instance.Run(args)
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\surface\app\deploy.py", line 61, in Run
    args, runtime_builder_strategy=runtime_builder_strategy)
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 425, in RunDeploy
    all_services, app.gcrDomain)
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\command_lib\app\deploy_util.py", line 254, in Deploy
    endpoints_info)
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\appengine_api_client.py", line 132, in DeployService
    service_config, manifest, version_id, image, endpoints_info)
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\appengine_api_client.py", line 541, in _CreateVersionResource
    json_version_resource)
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\lib\third_party\apitools\base\py\encoding.py", line 135, in PyValueToMessage
    return JsonToMessage(message_type, json.dumps(value))
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\bundledpython\lib\json\__init__.py", line 243, in dumps
    return _default_encoder.encode(obj)
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\bundledpython\lib\json\encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:\Users\Kcan2\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\bundledpython\lib\json\encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf8 in position 29: invalid start byte
    ERROR: gcloud crashed (UnicodeDecodeError): 'utf8' codec can't decode byte 0xf8 in position 29: invalid start byte

The code and deployment was working just yesterday. I updated the SDK, so I thought maybe that was it... trying reinstalling with no luck.

Deleted the code (The javascript parts) I added from yesterday, and still isn't working.

Have no idea how to even test this. Any advice would be awesome.

I'm using Django (not sure if that was obvious :-P )

Upvotes: 1

Views: 3271

Answers (1)

Kyle Cannon
Kyle Cannon

Reputation: 91

Figured it out.

Was a ø in my file code. Not UTF-8 supported. :-)

Live and learn

Upvotes: 2

Related Questions