Skip to content

Commit

Permalink
Merge pull request #271 from /issues/270
Browse files Browse the repository at this point in the history
cell_locations: Writing output to S3 was failing; fixed this
  • Loading branch information
shntnu authored Jun 2, 2023
2 parents 6bef01b + 708c500 commit 470fc56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pycytominer/cyto_utils/cell_locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ def _s3_file_exists(self, s3_path: str):
bucket, key = self._parse_s3_path(s3_path)

try:
self.s3.Object(bucket, key).load()
self.s3.head_object(Bucket=bucket, Key=key)
except botocore.exceptions.ClientError as e:
if e.response["Error"]["Code"] == "404":
if e.response["Error"]["Code"] in ["404", "400", "403"]:
return False
else:
raise
Expand Down

0 comments on commit 470fc56

Please sign in to comment.