bmaisonn opened a new issue, #8047: URL: https://github.com/apache/iceberg/issues/8047
### Apache Iceberg version 1.3.0 (latest release) ### Query engine Other ### Please describe the bug 🐞 Hi, When trying to connect to the glue catalog the exception attached below is raised. From what i see in the code here: https://github.com/apache/iceberg/blob/31e8c17971ad1dbd49b943aa908f1557a29cc1e3/python/pyiceberg/catalog/glue.py#L59 An incorrect parameter name is used `aws_secret_key_id` it should be `aws_access_key_id` I guess it was missed because the boto3 session is mocked in the integration tests https://github.com/apache/iceberg/blob/31e8c17971ad1dbd49b943aa908f1557a29cc1e3/python/tests/catalog/integration_test_glue.py#L43 To reproduce run this code: ``` from pyiceberg.catalog import load_catalog catalog = load_catalog("test") catalog.list_namespaces() ``` With a config yaml file pointing a glue catalog ``` --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[3], line 1 ----> 1 catalog.list_namespaces() File ~/XXX/env/lib/python3.9/site-packages/pyiceberg/catalog/glue.py:417, in GlueCatalog.list_namespaces(self, namespace) 414 return [] 416 database_list = [] --> 417 databases_response = self.glue.get_databases() 418 next_token = databases_response.get(PROP_GLUE_NEXT_TOKEN) 419 database_list += databases_response.get(PROP_GLUE_DATABASE_LIST, []) File ~/XXX/env/lib/python3.9/site-packages/botocore/client.py:530, in ClientCreator._create_api_method.._api_call(self, *args, **kwargs) 526 raise TypeError( 527 f"{py_operation_name}() only accepts keyword arguments." 528 ) 529 # The "self" in this scope is referring to the BaseClient. --> 530 return self._make_api_call(operation_name, kwargs) File ~/XXX/env/lib/python3.9/site-packages/botocore/client.py:947, in BaseClient._make_api_call(self, operation_name, api_params) 945 else: 946 apply_request_checksum(request_dict) --> 947 http, parsed_response = self._make_request( 948 operation_model, request_dict, request_context 949 ) 951 self.meta.events.emit( 952 'after-call.{service_id}.{operation_name}'.format( 953 service_id=service_id, operation_name=operation_name (...) 958 context=request_context, 959 ) 961 if http.status_code >= 300: File ~/XXX/env/lib/python3.9/site-packages/botocore/client.py:970, in BaseClient._make_request(self, operation_model, request_dict, request_context) 968 def _make_request(self, operation_model, request_dict, request_context): 969 try: --> 970 return self._endpoint.make_request(operation_model, request_dict) 971 except Exception as e: 972 self.meta.events.emit( 973 'after-call-error.{service_id}.{operation_name}'.format( 974 service_id=self._service_model.service_id.hyphenize(), (...) 978 context=request_context, 979 ) File ~/XXX/env/lib/python3.9/site-packages/botocore/endpoint.py:119, in Endpoint.make_request(self, operation_model, request_dict) 113 def make_request(self, operation_model, request_dict): 114 logger.debug( 115 "Making request for %s with params: %s", 116 operation_model, 117 request_dict, 118 ) --> 119 return self._send_request(request_dict, operation_model) File ~/XXX/env/lib/python3.9/site-packages/botocore/endpoint.py:198, in Endpoint._send_request(self, request_dict, operation_model) 196 context = request_dict['context'] 197 self._update_retries_context(context, attempts) --> 198 request = self.create_request(request_dict, operation_model) 199 success_response, exception = self._get_response( 200 request, operation_model, context 201 ) 202 while self._needs_retry( 203 attempts, 204 operation_model, (...) 207 exception, 208 ): File ~/XXX/env/lib/python3.9/site-packages/botocore/endpoint.py:134, in Endpoint.create_request(self, params, operation_model) 130 service_id = operation_model.service_model.service_id.hyphenize() 131 event_name = 'request-created.{service_id}.{op_name}'.format( 132 service_id=service_id, op_name=operation_model.name 133 ) --> 134 self._event_emitter.emit( 135 event_name, 136 request=request, 137 operation_name=operation_model.name, 138 ) 139 prepared_request = self.prepare_request(request) 140 return prepared_request File ~/XXX/env/lib/python3.9/site-packages/botocore/hooks.py:412, in EventAliaser.emit(self, event_name, **kwargs) 410 def emit(self, event_name, **kwargs): 411 aliased_event_name = self._alias_event_name(event_name) --> 412 return self._emitter.emit(aliased_event_name, **kwargs) File ~/XXX/env/lib/python3.9/site-packages/botocore/hooks.py:256, in HierarchicalEmitter.emit(self, event_name, **kwargs) 245 def emit(self, event_name, **kwargs): 246 """ 247 Emit an event by name with arguments passed as keyword args. 248 (...) 254 handlers. 255 """ --> 256 return self._emit(event_name, kwargs) File ~/XXX/env/lib/python3.9/site-packages/botocore/hooks.py:239, in HierarchicalEmitter._emit(self, event_name, kwargs, stop_on_response) 237 for handler in handlers_to_call: 238 logger.debug('Event %s: calling handler %s', event_name, handler) --> 239 response = handler(**kwargs) 240 responses.append((handler, response)) 241 if stop_on_response and response is not None: File ~/XXX/env/lib/python3.9/site-packages/botocore/signers.py:105, in RequestSigner.handler(self, operation_name, request, **kwargs) 100 def handler(self, operation_name=None, request=None, **kwargs): 101 # This is typically hooked up to the "request-created" event 102 # from a client's event emitter. When a new request is created 103 # this method is invoked to sign the request. 104 # Don't call this method directly. --> 105 return self.sign(operation_name, request) File ~/XXX/env/lib/python3.9/site-packages/botocore/signers.py:189, in RequestSigner.sign(self, operation_name, request, region_name, signing_type, expires_in, signing_name) 186 else: 187 raise e --> 189 auth.add_auth(request) File ~/XXX/env/lib/python3.9/site-packages/botocore/auth.py:432, in SigV4Auth.add_auth(self, request) 429 signature = self.signature(string_to_sign, request) 430 logger.debug('Signature:\n%s', signature) --> 432 self._inject_signature_to_request(request, signature) File ~/XXX/env/lib/python3.9/site-packages/botocore/auth.py:435, in SigV4Auth._inject_signature_to_request(self, request, signature) 434 def _inject_signature_to_request(self, request, signature): --> 435 auth_str = ['AWS4-HMAC-SHA256 Credential=%s' % self.scope(request)] 436 headers_to_sign = self.headers_to_sign(request) 437 auth_str.append( 438 f"SignedHeaders={self.signed_headers(headers_to_sign)}" 439 ) File ~/XXX/env/lib/python3.9/site-packages/botocore/auth.py:384, in SigV4Auth.scope(self, request) 382 scope.append(self._service_name) 383 scope.append('aws4_request') --> 384 return '/'.join(scope) TypeError: sequence item 0: expected str instance, NoneType found ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
