zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

Zarr over ssh fails with `unexpected keyword argument`

Open b8raoult opened this issue 2 months ago • 2 comments

Zarr version

3.1.3

Numcodecs version

0.15.1

Python Version

3.12.9

Operating System

Linux

Installation

uv pip install

Description

Calling zarr.open with an ssh://... url fails with the following error:

  File ".../python3.12/site-packages/fsspec/implementations/sftp.py", line 48, in __init__
    self._connect()
  File ".../python3.12/site-packages/fsspec/implementations/sftp.py", line 54, in _connect
    self.client.connect(self.host, **self.ssh_kwargs)
TypeError: SSHClient.connect() got an unexpected keyword argument 'asynchronous'

Not sure if this is a Zarr issue or an fsspec issue, but as it works with zarr2, I decided to report it here,

Steps to reproduce

Make sure that fsspec is installed with pip install fsspec[ssh]

Additional output

No response

b8raoult avatar Nov 09 '25 18:11 b8raoult

thanks for this report -- I think this is likely an fsspec issue? cc @martindurant

d-v-b avatar Nov 09 '25 21:11 d-v-b

It sounds like zarr is passing asynchronous= as a kwarg to fsspec - but it should not, as the builtin ssh backend is not async-capable. It should instead be wrapped in an AsyncFileSystemWrapper.

It may be there is confusion with the other implementation of an ssh backend, https://github.com/fsspec/sshfs , which is async capable.

martindurant avatar Nov 11 '25 18:11 martindurant