【发布时间】:2019-04-12 06:25:30
【问题描述】:
运行“gcloud components update”或“gcloud components list”时,它会崩溃并显示错误消息:TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
如何解决问题?
【问题讨论】:
标签: gcloud
运行“gcloud components update”或“gcloud components list”时,它会崩溃并显示错误消息:TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
如何解决问题?
【问题讨论】:
标签: gcloud
如果您看到此错误,很可能是您安装了container-builder-local 组件。崩溃是因为该组件在版本 224.0.0 中被删除并替换为cloud-build-local。
所以解决方法是:
删除容器生成器本地:gcloud components remove container-builder-local
更新:gcloud components update
安装云构建本地:gcloud components install cloud-build-local
【讨论】:
210.0.0也会发生这种情况。
我目前正在使用 gcloud v222.0.0 并遇到错误:
ERROR: gcloud crashed (TypeError): unsupported operand type(s) for +=: 'int' and 'NoneType' 尝试更新组件时。
我可以确认删除 container-build-local 并更新到 cloud-build-local 可以修复此错误。
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 │ │ │
└──────────────────────────────────┴─────────┴─────────┘
我没有意识到这一重大变化
【讨论】: