GithubHelp home page GithubHelp logo

Comments (6)

ezhov-evgeny avatar ezhov-evgeny commented on August 19, 2024

@bsteverink Can you provide DEBUG logs?

from webdav-client-python-3.

ezhov-evgeny avatar ezhov-evgeny commented on August 19, 2024

@bsteverink is it actual?

from webdav-client-python-3.

jackedproxy avatar jackedproxy commented on August 19, 2024

Having a very similar issue, although info just returns "None" for all parameters with the exception of the last modified date.
Currently on webdavclient3==0.14
Here's part of the code:

def Download():
		client = wc.Client(SyncBits.CryptSyncVars())
		try:
                    JoplinRemote = ("PortableArray/Latest/PortableArray/Windows/Joplin/")
		    JoplinRemoteReady = client.check(JoplinRemote)
                    JoplinLocal = ("{}\\Windows\\Joplin\\" .format(path))
	            JoplinLocalReady = os.path.exists(JoplinLocal)
		    info = client.info(JoplinRemote)
		    check = client.check(JoplinRemote)
		    print(info)
		    print(check)
	            print(path)
                    if (JoplinRemoteReady, JoplinLocalReady):
				print("Connected! Caught PortableArray!")
				ThePull = client.download_sync(remote_path=JoplinRemote, local_path=JoplinLocal)

Here's the error:

Received Download!
{'created': None, 'name': None, 'size': None, 'modified': 'Wed, 08 Jan 2020 19:47:13 GMT'}
True
C:\Users\multiplexer\Documents\PortableArray
Connected! Caught PortableArray!
Traceback (most recent call last):
  File "ArrayDeploymentSyncEX.py", line 211, in <module>
    menu()
  File "ArrayDeploymentSyncEX.py", line 71, in menu
    SyncBits.Download()
  File "ArrayDeploymentSyncEX.py", line 137, in Download
    ThePull = client.download_sync(remote_path=JoplinRemote, local_path=JoplinLocal)
  File "C:\Users\multiplexer\AppData\Local\Programs\Python\Python37\lib\site-packages\webdav3\client.py", line 399, in download_sync
    self.download(local_path=local_path, remote_path=remote_path)
  File "C:\Users\multiplexer\AppData\Local\Programs\Python\Python37\lib\site-packages\webdav3\client.py", line 342, in download
    self.download_directory(local_path=local_path, remote_path=remote_path, progress=progress)
  File "C:\Users\multiplexer\AppData\Local\Programs\Python\Python37\lib\site-packages\webdav3\client.py", line 366, in download_directory
    self.download(local_path=_local_path, remote_path=_remote_path, progress=progress)
  File "C:\Users\multiplexer\AppData\Local\Programs\Python\Python37\lib\site-packages\webdav3\client.py", line 341, in download
    if self.is_dir(urn.path()):
  File "C:\Users\multiplexer\AppData\Local\Programs\Python\Python37\lib\site-packages\webdav3\client.py", line 69, in _wrapper
    res = fn(self, *args, **kw)
  File "C:\Users\multiplexer\AppData\Local\Programs\Python\Python37\lib\site-packages\webdav3\client.py", line 611, in is_dir
    self._check_remote_resource(remote_path, urn)
  File "C:\Users\multiplexer\AppData\Local\Programs\Python\Python37\lib\site-packages\webdav3\client.py", line 599, in _check_remote_resource
    raise RemoteResourceNotFound(remote_path)
webdav3.exceptions.RemoteResourceNotFound: Remote resource: /PortableArray/Latest/PortableArray/Windows/Joplin/Joplin/ not found

Notice how the remote_path has the last directory in the given path duplicated:
webdav3.exceptions.RemoteResourceNotFound: Remote resource: /PortableArray/Latest/PortableArray/Windows/Joplin/Joplin/ not found

I've been scratching my head trying to figure out why that happens.
The client.check(JoplinRemote) returns True though, so I'm unsure what I'm missing:
JoplinRemote = ("/PortableArray/Latest/PortableArray/Windows/Joplin/")

from webdav-client-python-3.

ezhov-evgeny avatar ezhov-evgeny commented on August 19, 2024

@jackedproxy @bsteverink Can you provide options (of course without credentials) which you use for creating client? I can not reproduce this problem.

from webdav-client-python-3.

jackedproxy avatar jackedproxy commented on August 19, 2024

@ezhov-evgeny

options = {
			a1: a2,  # URL
			b1: b2,  # User
			c1: c2,  # Password
			d1: True,  # Verbosity
			'webdav_root': "/"
		}
		return options

I've since resolved the issue, I suspect I had some weird formatting happening as I've been encoding my options. It's working fine now, with the following:

downparams = {'ZippedRemoteJoplinResources': ("PortableArray/Latest/JoplinProfile.7z"),
			'ZippedLocalJoplinResources': ("{}\\Windows\\Joplin\\JoplinProfile.7z" .format(path)),
			'LocalJoplinResources': ("{}\\Windows\\Joplin" .format(path))
		}
  #(...)
try:
    client.download_sync(remote_path=(downparams['ZippedRemoteJoplinResources']), local_path= 
    (downparams['ZippedLocalJoplinResources']))
	print("Joplin Resources pulled...")

from webdav-client-python-3.

ezhov-evgeny avatar ezhov-evgeny commented on August 19, 2024

@bsteverink @jackedproxy try new version 3.14.2 it should be resolved there

from webdav-client-python-3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.