Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcloud components update crashes when updating to 224.0.0

Tags:

gcloud

When running "gcloud components update" or "gcloud components list", it crashes with the error message: TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'

How to solve the problem?

like image 779
Chaoren Liu Avatar asked Nov 08 '18 17:11

Chaoren Liu


2 Answers

If you see this error, it is most likely that you installed the container-builder-local component. The crash is because this component was removed in version 224.0.0 and replaced with cloud-build-local.

So the work-around is:

  1. remove container-builder-local: gcloud components remove container-builder-local

  2. update: gcloud components update

  3. install cloud-build-local: gcloud components install cloud-build-local

like image 194
Chaoren Liu Avatar answered Sep 20 '22 12:09

Chaoren Liu


I'm currently on gcloud v222.0.0 and ran into the error: ERROR: gcloud crashed (TypeError): unsupported operand type(s) for +=: 'int' and 'NoneType' when trying to update components.

I can confirm that removing container-build-local and updating to cloud-build-local fixes this error.

Installing components from version: 224.0.0

┌──────────────────────────────────────────────────────┐
│         These components will be installed.          │
├──────────────────────────────────┬─────────┬─────────┤
│               Name               │ Version │   Size  │
├──────────────────────────────────┼─────────┼─────────┤
│ Google Cloud Build Local Builder │   0.4.2 │ 5.9 MiB │
│ Google Cloud Build Local Builder │         │         │
└──────────────────────────────────┴─────────┴─────────┘

I was caught unaware of this breaking change

like image 20
Adam Leary Avatar answered Sep 19 '22 12:09

Adam Leary