BUG: cannot .read() from Windows samba share
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 151
- Avg merge
- 8h 24m
- Merged PRs (30d)
- 2
Description
I have a problem with reading files from shared Windows samba storage.
I can read the catalog `.yml` file and all the metadata, but when I launch `.read()` it replaces the first slash with `c:` and cannot read the content of the file.
Minimal reproducible example:
```python
from pathlib import Path
import intake
DATA_PATH = Path(r"\\path\to\windows\samba\share")
cat = intake.open_catalog(DATA_PATH / "cat.yml")
cat.test_numpy.read()
```
Content of the `cat.yml`
```yaml
description: Samba share test
sources:
test_numpy:
description: Test numpy
driver: numpy
args:
path: "{{ CATALOG_DIR }}/numpy.npy"
```
When I launch `print(cat.test_numpy)` everything is ok (except of the number of slashes in the beginning and before `numpy.npy`):
```yaml
sources:
test_numpy:
args:
path: /path/to/windows/samba/share//numpy.npy
description: Test numpy
driver: intake.source.npy.NPySource
metadata:
catalog_dir: /path/to/windows/samba/share/
```
But it crashes on `cat.test_numpy.read()`:
```
FileNotFoundError: [Errno 2] No such file or directory: '[c:/path/to/windows/samba/sahre/numpy.npy](file:///C:/path/to/windows/samba/share/numpy.npy)'
```
As far as I understand, it replaces the first slash in the path `//path/to/windows/samba/share/numpy.npy` with `C:`, and therefore cannot access the file.
OS: Windows 10
intake: 0.6.8 and commit e362825 from git
intake-xarray: 0.4.1
fsspec: 2023.5.0
python: 3.10.11
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.