kou commented on PR #44225:
URL: https://github.com/apache/arrow/pull/44225#issuecomment-2378365291

   Hmm. This Python test failure is related:
   
   
https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/50686170#L4202
   
   ```text
   ================================== FAILURES 
===================================
   _________________ test_write_to_dataset_with_partitions_s3fs 
__________________
   func = <bound method ClientCreator._create_api_method.<locals>._api_call of 
<aiobotocore.client.S3 object at 0x000002067623C910>>
       async def _error_wrapper(func, *, args=(), kwargs=None, retries):
           if kwargs is None:
               kwargs = {}
           for i in range(retries):
               try:
   >               return await func(*args, **kwargs)
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\s3fs\core.py:113: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _
   self = <aiobotocore.client.S3 object at 0x000002067623C910>
   operation_name = 'PutObject'
   api_params = {'Body': <_io.BytesIO object at 0x00000206757BA430>, 'Bucket': 
'test-s3fs', 'Key': '603f9b473acc46d8ac484d30de106993\\_common_metadata'}
       async def _make_api_call(self, operation_name, api_params):
           operation_model = self._service_model.operation_model(operation_name)
           service_name = self._service_model.service_name
           history_recorder.record(
               'API_CALL',
               {
                   'service': service_name,
                   'operation': operation_name,
                   'params': api_params,
               },
           )
           if operation_model.deprecated:
               logger.debug(
                   'Warning: %s.%s() is deprecated', service_name, 
operation_name
               )
           request_context = {
               'client_region': self.meta.region_name,
               'client_config': self.meta.config,
               'has_streaming_input': operation_model.has_streaming_input,
               'auth_type': operation_model.resolved_auth_type,
               'unsigned_payload': operation_model.unsigned_payload,
           }
       
           api_params = await self._emit_api_params(
               api_params=api_params,
               operation_model=operation_model,
               context=request_context,
           )
           (
               endpoint_url,
               additional_headers,
               properties,
           ) = await self._resolve_endpoint_ruleset(
               operation_model, api_params, request_context
           )
           if properties:
               # Pass arbitrary endpoint info with the Request
               # for use during construction.
               request_context['endpoint_properties'] = properties
           request_dict = await self._convert_to_request_dict(
               api_params=api_params,
               operation_model=operation_model,
               endpoint_url=endpoint_url,
               context=request_context,
               headers=additional_headers,
           )
           resolve_checksum_context(request_dict, operation_model, api_params)
       
           service_id = self._service_model.service_id.hyphenize()
           handler, event_response = await self.meta.events.emit_until_response(
               f'before-call.{service_id}.{operation_name}',
               model=operation_model,
               params=request_dict,
               request_signer=self._request_signer,
               context=request_context,
           )
       
           if event_response is not None:
               http, parsed_response = event_response
           else:
               maybe_compress_request(
                   self.meta.config, request_dict, operation_model
               )
               apply_request_checksum(request_dict)
               http, parsed_response = await self._make_request(
                   operation_model, request_dict, request_context
               )
       
           await self.meta.events.emit(
               f'after-call.{service_id}.{operation_name}',
               http_response=http,
               parsed=parsed_response,
               model=operation_model,
               context=request_context,
           )
       
           if http.status_code >= 300:
               error_info = parsed_response.get("Error", {})
               error_code = error_info.get("QueryErrorCode") or error_info.get(
                   "Code"
               )
               error_class = self.exceptions.from_code(error_code)
   >           raise error_class(parsed_response, operation_name)
   E           botocore.exceptions.ClientError: An error occurred 
(XMinioInvalidObjectName) when calling the PutObject operation: Object name 
contains unsupported characters.
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\aiobotocore\client.py:412: 
ClientError
   The above exception was the direct cause of the following exception:
   s3_example_s3fs = (<s3fs.core.S3FileSystem object at 0x0000020674725E00>, 
'test-s3fs/603f9b473acc46d8ac484d30de106993')
       @pytest.mark.pandas
       @pytest.mark.s3
       def test_write_to_dataset_with_partitions_s3fs(s3_example_s3fs):
           fs, path = s3_example_s3fs
       
   >       _test_write_to_dataset_with_partitions(
               path, filesystem=fs)
   pyarrow\tests\parquet\test_dataset.py:1081: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _
   pyarrow\tests\parquet\test_dataset.py:949: in 
_test_write_to_dataset_with_partitions
       with filesystem.open(metadata_path, 'wb') as f:
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\fsspec\spec.py:2068: in 
__exit__
       self.close()
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\fsspec\spec.py:2035: in close
       self.flush(force=True)
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\fsspec\spec.py:1899: in flush
       if self._upload_chunk(final=force) is not False:
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\s3fs\core.py:2371: in 
_upload_chunk
       self.commit()
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\s3fs\core.py:2389: in commit
       write_result = self._call_s3("put_object", **kw)
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\s3fs\core.py:2234: in 
_call_s3
       return self.fs.call_s3(method, self.s3_additional_kwargs, *kwarglist, 
**kwargs)
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\fsspec\asyn.py:118: in 
wrapper
       return sync(self.loop, func, *args, **kwargs)
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\fsspec\asyn.py:103: in sync
       raise return_result
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\fsspec\asyn.py:56: in _runner
       result[0] = await coro
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\s3fs\core.py:365: in _call_s3
       return await _error_wrapper(
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _
   func = <bound method ClientCreator._create_api_method.<locals>._api_call of 
<aiobotocore.client.S3 object at 0x000002067623C910>>
       async def _error_wrapper(func, *, args=(), kwargs=None, retries):
           if kwargs is None:
               kwargs = {}
           for i in range(retries):
               try:
                   return await func(*args, **kwargs)
               except S3_RETRYABLE_ERRORS as e:
                   err = e
                   logger.debug("Retryable error: %s", e)
                   await asyncio.sleep(min(1.7**i * 0.1, 15))
               except ClientError as e:
                   logger.debug("Client error (maybe retryable): %s", e)
                   err = e
                   wait_time = min(1.7**i * 0.1, 15)
                   if "SlowDown" in str(e):
                       await asyncio.sleep(wait_time)
                   elif "reduce your request rate" in str(e):
                       await asyncio.sleep(wait_time)
                   elif "XAmzContentSHA256Mismatch" in str(e):
                       await asyncio.sleep(wait_time)
                   else:
                       break
               except Exception as e:
                   logger.debug("Nonretryable error: %s", e)
                   err = e
                   break
       
           if "'coroutine'" in str(err):
               # aiobotocore internal error - fetch original botocore error
               tb = err.__traceback__
               while tb.tb_next:
                   tb = tb.tb_next
               try:
                   await tb.tb_frame.f_locals["response"]
               except Exception as e:
                   err = e
           err = translate_boto_error(err)
   >       raise err
   E       OSError: [Errno 5] An error occurred (XMinioInvalidObjectName) when 
calling the PutObject operation: Object name contains unsupported characters.
   C:\Miniconda38-x64\envs\arrow\lib\site-packages\s3fs\core.py:145: OSError
   ```


-- 
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]

Reply via email to