Error `Object of type datetime is not JSON serializable` when uploading file with `gcloud run jobs replace tmp.yaml`

34 Views Asked by At

Im running Google Cloud SDK 458.0.1 & core 2023.12.20 with python 3.11.4 Im calling the command on a file tmp.yaml which was downloaded with gcloud run jobs describe <job name> --format export I am getting ERROR: gcloud crashed (TypeError): Object of type datetime is not JSON serializable

The error (I think) is being caused by the lines

metadata:
  labels:
    run.googleapis.com/lastUpdatedTime: 2024-01-07T03:37:17.506925Z

however these lines are appended during execution of the replace command

Does anyone know how to resolve this?

0

There are 0 best solutions below