I have been trying to create a GCP data bucket in my test gcp account assigned to me by my organisation. I keep getting a timeout error though and not sure why… any body able to help? code and error below.
import os from google.cloud import storage os.environ["GOOGLE_APPLICATION_CREDENTIALS"]="testproject.json" storage_client = storage.Client() ## Create a bucket bucket_name = 'test-bucket-25-11-2021-v5' def create_bucket(bucket_name): bucket = storage_client.create_bucket(bucket_name) #bucket.create(location='europe-west2') print('Bucket: ' + bucket_name + ' created.') create_bucket(bucket_name)
Source: Python-3x Questions