Skip to content

webdav3.exceptions.MethodNotSupported #126

@Tim-IA

Description

@Tim-IA
from webdav3.client import Client
import requests, yaml, logging, os
PATH="/share/document/"
NAS="NAS/"
NAS_file="NAS.pdf"
remote=PATH+NAS
remote_path=PATH+NAS+NAS_file
local_path="./Docs/"
logging.captureWarnings(True)

doc="http://.com"
with open('config.yaml') as f:
    config = yaml.load(f, Loader=yaml.loader.SafeLoader)

options = {
 'webdav_hostname': doc,
 'webdav_login': config['login'],
 'webdav_password': config["password"],
 'webdav_override_methods': {
            'check': 'GET'
        }
}
client = Client(options)
print(client.webdav.is_valid())
# client.verify = False
client.default_options['SSL_VERIFYPEER'] = False 
client.default_options['SSL_VERIFYHOST'] = False
client.download_sync(remote_path=remote_path, local_path=local_path)

Python output:

webdav3.exceptions.MethodNotSupported: Method 'is_dir' not supported for http://.com

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