Update app.py
Browse files
app.py
CHANGED
@@ -30,8 +30,8 @@ logger = logging.getLogger(__name__)
|
|
30 |
|
31 |
try:
|
32 |
credentials_info = json.loads(GOOGLE_APPLICATION_CREDENTIALS_JSON)
|
33 |
-
|
34 |
-
bucket =
|
35 |
logger.info(f"Conexi贸n con Google Cloud Storage exitosa. Bucket: {GCS_BUCKET_NAME}")
|
36 |
|
37 |
except (DefaultCredentialsError, json.JSONDecodeError, KeyError, ValueError) as e:
|
|
|
30 |
|
31 |
try:
|
32 |
credentials_info = json.loads(GOOGLE_APPLICATION_CREDENTIALS_JSON)
|
33 |
+
client = storage.Client.from_service_account_info(credentials_info)
|
34 |
+
bucket = client.get_bucket(GCS_BUCKET_NAME)
|
35 |
logger.info(f"Conexi贸n con Google Cloud Storage exitosa. Bucket: {GCS_BUCKET_NAME}")
|
36 |
|
37 |
except (DefaultCredentialsError, json.JSONDecodeError, KeyError, ValueError) as e:
|