Takash Futada
Takash Futada

Reputation: 736

gcloud crashed (AttributeError): 'NoneType' object has no attribute 'revisionTemplate'

I'm working on Cloud Run, which seems to be beta yet, preventing from redeploying as shown below. It works if I delete the service from GCP console, then deploy the same Docker as a new service. I could not find a way to to set revisionTemplate.

I run this command to deploy a Cloud Run service using gcloud.

gcloud beta run deploy v2-cms --image gcr.io/my-project/v2-cms --quiet

Then, it fails saying like this.

X Deploying...                                                                                                            
  . Creating Revision...                                                                                                  
  . Routing traffic...                                                                                                    
Deployment failed                                                                                                         
ERROR: gcloud crashed (AttributeError): 'NoneType' object has no attribute 'revisionTemplate'

If you would like to report this issue, please run the following command:
  gcloud feedback

To check gcloud for common problems, please run the following command:
  gcloud info --run-diagnostics

Upvotes: 6

Views: 11282

Answers (4)

after-ephemera
after-ephemera

Reputation: 371

I ran into this recently and the issue was that my version of Python (3.11) was too new. I had to switch back to 3.9.

Upvotes: 1

mik
mik

Reputation: 21

I had the same problem on FreeBSD 13.2 after upgrading gcloud to 434.0.0 version:

ERROR: gcloud crashed (AttributeError): 'NoneType' object has no attribute 'clean_version'

I fixed it in /usr/local/google-cloud-sdk/lib/googlecloudsdk/core/transport.py, line 628:

  os=user_platform.operating_system,
#  os_version=user_platform.operating_system.clean_version,
  os_version='13.2',
  architecture=architecture,

Upvotes: 2

s0urcer
s0urcer

Reputation: 332

Make sure that your local Tensorflow version is still supported by GCloud https://cloud.google.com/ai-platform/training/docs/runtime-version-list

Upvotes: 0

Steren
Steren

Reputation: 7929

To fix this issue, please update gcloud to ite latest version with gcloud components update

Upvotes: 10

Related Questions