File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
src/aind_ephys_portal/panel Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change 1212from aind_ephys_portal .panel .utils import format_link , OUTER_STYLE , EPHYSGUI_LINK_PREFIX
1313
1414s3_client = boto3 .client ("s3" )
15- s3_unsigned_client = boto3 .client ('s3' , config = Config (signature_version = UNSIGNED ))
1615
1716
1817class EphysPortal :
@@ -160,13 +159,8 @@ def get_raw_asset_location(self, asset_location):
160159 try :
161160 response = s3_client .list_objects_v2 (Bucket = bucket_name , Prefix = prefix , MaxKeys = 1 )
162161 except Exception as e :
163- # Try with unsigned client
164- print (f"Error listing objects from { bucket_name } /{ prefix } : { e } \n Trying with unsigned client..." )
165- try :
166- response = s3_unsigned_client .list_objects_v2 (Bucket = bucket_name , Prefix = prefix , MaxKeys = 1 )
167- except Exception as e :
168- print (f"Error listing objects with unsigned client from { bucket_name } /{ prefix } : { e } " )
169- continue
162+ print (f"Error listing objects with unsigned client from { bucket_name } /{ prefix } : { e } " )
163+ continue
170164 if "Contents" in response :
171165 raw_asset_location = f"s3://{ bucket_name } /{ prefix } "
172166 break
You can’t perform that action at this time.
0 commit comments