DVC push gives "ERROR: unexpected error - [Errno 21] Is a directory"

Hi, I am new to using dvc. I’ve set up an S3 bucket and want to push some image data to it. The dvc push commit then throws “ERROR: unexpected error - [Errno 21] Is a directory”.

Using the debug flag when doing dvc push gives a more detailed traceback.

  File "/<venv-path>/python3.10/site-packages/s3fs/core.py", line 341, in _call_s3
    await self.set_session()
  File "/<venv-path>/lib/python3.10/site-packages/s3fs/core.py", line 527, in set_session
    self._s3 = await s3creator.__aenter__()
  File "/<venv-path>/lib/python3.10/site-packages/aiobotocore/session.py", line 27, in __aenter__
    self._client = await self._coro
  File "/<venv-path>/lib/python3.10/site-packages/aiobotocore/session.py", line 211, in _create_client
    client = await client_creator.create_client(
  File "/<venv-path>/lib/python3.10/site-packages/aiobotocore/client.py", line 76, in create_client
    client_args = self._get_client_args(
  File "/<venv-path>/lib/python3.10/site-packages/aiobotocore/client.py", line 267, in _get_client_args
    return args_creator.get_client_args(
  File "/<venv-path>/lib/python3.10/site-packages/aiobotocore/args.py", line 76, in get_client_args
    endpoint = endpoint_creator.create_endpoint(
  File "/<venv-path>/lib/python3.10/site-packages/aiobotocore/endpoint.py", line 315, in create_endpoint
    http_session = http_session_cls(
  File "/<venv-path>/lib/python3.10/site-packages/aiobotocore/httpsession.py", line 109, in __init__
    ssl_context.load_verify_locations(ca_certs, None, None)
IsADirectoryError: [Errno 21] Is a directory

Does the error suggest that something is wrong with the remote bucket or with the files I am trying to push to it? I’ve also tried pushing a simple test yaml file but get the same issue.

It looks like there is something wrong with your remote configuration. Are you using the ssl_verify option ? (Or any other dvc remote modify S3 remote options?)

Hi, thanks for reaching out!

I have set the endpointurl, secret_access_key & access_key_id of my s3 bucket, but not modifed anything else.

Can you please run dvc doctor and post the output