Skip to content

Commit

Permalink
Try with no strict JSON load
Browse files Browse the repository at this point in the history
  • Loading branch information
evamaxfield authored Mar 24, 2023
1 parent 4743ab6 commit 0b860f5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cdp_backend/pipeline/pipeline_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ def validated_gcs_bucket_name(self) -> str:

else:
# Open the key to get the project id
with open(self.google_credentials_file) as open_resource:
creds = json.load(open_resource)
with open(
self.google_credentials_file,
encoding="utf-8",
) as open_resource:
creds = json.load(open_resource, strict=False)
project_id = creds["project_id"]

# Remove all files in bucket
Expand Down Expand Up @@ -118,8 +121,11 @@ def validated_gcs_bucket_name(self) -> str:

else:
# Open the key to get the project id
with open(self.google_credentials_file) as open_resource:
creds = json.load(open_resource)
with open(
self.google_credentials_file,
encoding="utf-8",
) as open_resource:
creds = json.load(open_resource, strict=False)
project_id = creds["project_id"]

# Remove all files in bucket
Expand Down

0 comments on commit 0b860f5

Please sign in to comment.