Skip to content

Can list() files, but cannot download. "Remote resource not found" #145

Description

@sunithb

python 3.11
webdav3 3.14.5

I can connect to the WebDAV server (NextCloud) and list the files as follows:

client.list("Transfer/openvino/carpet/") 

['carpet/', 'metadata.json', 'model.bin', 'model.onnx', 'model.xml', 'notebook1.py', 'openvino_inferencer.py', 'test.zip']

But when I try to download 'model.bin', I get the following error

client.download_file("Transfer/openvino/carpet/model.bin","~/model.bin") 

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/device1531/openvino_env/lib/python3.11/site-packages/webdav3/client.py", line 67, in _wrapper
    res = fn(self, *args, **kw)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/device1531/openvino_env/lib/python3.11/site-packages/webdav3/client.py", line 447, in download_file
    if self.is_dir(urn.path()):
       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/device1531/openvino_env/lib/python3.11/site-packages/webdav3/client.py", line 67, in _wrapper
    res = fn(self, *args, **kw)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/home/device1531/openvino_env/lib/python3.11/site-packages/webdav3/client.py", line 781, in is_dir
    return WebDavXmlUtils.parse_is_dir_response(content=response.content, path=path, hostname=self.webdav.hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/device1531/openvino_env/lib/python3.11/site-packages/webdav3/client.py", line 1164, in parse_is_dir_response
    response = WebDavXmlUtils.extract_response_for_path(content=content, path=path, hostname=hostname)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/device1531/openvino_env/lib/python3.11/site-packages/webdav3/client.py", line 1251, in extract_response_for_path
    raise RemoteResourceNotFound(path)
webdav3.exceptions.RemoteResourceNotFound: Remote resource: /Transfer/openvino/carpet/model.bin not found

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions