-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
The following code is working
client.check(remote_path) #returns true (file is present)
client.list() #lists all files correctly
but the following statements won't work
print(client.info("0000249385.zip").size)
print(client.info(remote_path))
The whole code:
def downloadFile(id):
remote_path = id + ".zip"
local_path = "C:/User/i/Desktop/" + id + ".zip"
import webdav.client as wc
options = {
'webdav_hostname': "https://server.com:8081/Testfolder/",
'webdav_login': "user",
'webdav_password': 'password'
}
client = wc.Client(options)
client.webdav.is_valid()
client.default_options['SSL_VERIFYPEER'] = False
client.default_options['SSL_VERIFYHOST'] = False
#this statement list all files correctly
print(client.list())
#returns true (as expected)
print(client.check(remote_path))
The error from the Python IDLE console
===== RESTART: C:/Users/i/AppData/Local/Programs/Python/Python36/test.py =====
['Testfolder/', '@Recycle/', '0000249385.zip', 'index.txt']
Traceback (most recent call last):
File "C:/Users/i/AppData/Local/Programs/Python/Python36/test.py", line 62, in <module>
downloadFile("0000249385")
File "C:/Users/i/AppData/Local/Programs/Python/Python36/test.py", line 21, in downloadFile
print(client.info("0000249385.zip").size)
File "C:\Users\i\AppData\Local\Programs\Python\Python36\lib\site-packages\webdav\client.py", line 803, in info
return parse(response, path)
File "C:\Users\i\AppData\Local\Programs\Python\Python36\lib\site-packages\webdav\client.py", line 776, in parse
raise RemoteResourceNotFound(path)
webdav.exceptions.RemoteResourceNotFound: Remote resource: /0000249385.zip not found
Metadata
Metadata
Assignees
Labels
No labels