-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working Backup to sinology webdav server on OctoPrint 1.5.2 Python 3.7.3 OctoPi 0.17.0 #4
Comments
Duplicate of #3 |
I'm not sure is the same problem of issue #3 |
You are right, I assumed it was the same issue since the titles were nearly the same. Reopening this one. |
Currently looking into this. The piece of code that does the recursive checking of the path appears to have a few bugs, but it could also be an authentication issue that makes that checking the path always fails, which the code incorrectly interprets as a non-existing folder. Expect to release a fix later this week. |
@courtpl I've fixed some bugs that made the plugin try to get to the parent of / for about 1000 times before giving up when either the URL or the credentials for WebDAV were wrong. It should now at least give a more sensible error message when it's failing to connect or upload. |
When i try to use synology webdav backup:
Backup configuration
Server address: http://nasxx:5005/
username: yyyyyy
pasword : xxx
path: /OctopiBckp/%Y
I can acces to the sysnology repository with the command dav://nasxx:5005/OctopiBckp
Error message:
2021-01-19 18:08:00,470 - octoprint.plugin - ERROR - Error while calling plugin webdavbackup
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/init.py", line 271, in call_plugin
result = getattr(plugin, method)(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/init.py", line 1890, in wrapper
return f(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_webdavbackup/init.py", line 71, in on_event
_recursive_create_path(upload_path)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_webdavbackup/init.py", line 68, in _recursive_create_path
_recursive_create_path(os.path.abspath(os.path.join(path, "..")))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_webdavbackup/init.py", line 68, in _recursive_create_path
_recursive_create_path(os.path.abspath(os.path.join(path, "..")))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_webdavbackup/init.py", line 68, in _recursive_create_path
_recursive_create_path(os.path.abspath(os.path.join(path, "..")))
[Previous line repeated 960 more times]
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_webdavbackup/init.py", line 64, in _recursive_create_path
if davclient.check(path):
File "/home/pi/oprint/lib/python3.7/site-packages/webdav3/client.py", line 66, in _wrapper
res = fn(self, *args, **kw)
File "/home/pi/oprint/lib/python3.7/site-packages/webdav3/client.py", line 292, in check
response = self.execute_request(action='check', path=urn.quote())
File "/home/pi/oprint/lib/python3.7/site-packages/webdav3/client.py", line 217, in execute_request
verify=self.verify
File "/home/pi/oprint/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/home/pi/oprint/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/home/pi/oprint/lib/python3.7/site-packages/urllib3/connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/home/pi/oprint/lib/python3.7/site-packages/urllib3/connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "/home/pi/oprint/lib/python3.7/site-packages/sentry_sdk/integrations/stdlib.py", line 102, in getresponse
rv = real_getresponse(self, *args, **kwargs)
File "/usr/lib/python3.7/http/client.py", line 1336, in getresponse
response.begin()
File "/usr/lib/python3.7/http/client.py", line 330, in begin
self.headers = self.msg = parse_headers(self.fp)
File "/usr/lib/python3.7/http/client.py", line 224, in parse_headers
return email.parser.Parser(_class=_class).parsestr(hstring)
File "/usr/lib/python3.7/email/parser.py", line 68, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
File "/usr/lib/python3.7/email/parser.py", line 57, in parse
feedparser.feed(data)
File "/usr/lib/python3.7/email/feedparser.py", line 176, in feed
self._call_parse()
File "/usr/lib/python3.7/email/feedparser.py", line 180, in _call_parse
self._parse()
File "/usr/lib/python3.7/email/feedparser.py", line 295, in _parsegen
if self._cur.get_content_maintype() == 'message':
File "/usr/lib/python3.7/email/message.py", line 594, in get_content_maintype
ctype = self.get_content_type()
File "/usr/lib/python3.7/email/message.py", line 578, in get_content_type
value = self.get('content-type', missing)
File "/usr/lib/python3.7/email/message.py", line 471, in get
return self.policy.header_fetch_parse(k, v)
File "/usr/lib/python3.7/email/_policybase.py", line 316, in header_fetch_parse
return self._sanitize_header(name, value)
File "/usr/lib/python3.7/email/_policybase.py", line 287, in _sanitize_header
if _has_surrogates(value):
File "/usr/lib/python3.7/email/utils.py", line 57, in _has_surrogates
s.encode()
RecursionError: maximum recursion depth exceeded while calling a Python object
The text was updated successfully, but these errors were encountered: