CloudPolis / webdav-client-cpp

:cloud: C++ WebDAV Client provides easy and convenient to work with WebDAV-servers.
http://cloudpolis.github.io/webdav-client-cpp/
Other
120 stars 52 forks source link

'Method "free" not supported' error #52

Closed Nawor3565 closed 3 years ago

Nawor3565 commented 3 years ago

After making a backup, nothing appears in my Webdav share (running on a self-hosted FreeNAS). The octoprint.log says:


TypeError: can only concatenate str (not "tuple") to str
2021-03-02 19:58:18,187 - octoprint.plugins.backup - INFO - Creating backup zip at /home/pi/.octoprint/data/backup/.octoprint-backup-20210302-195818.zip (excluded: uploads)...
2021-03-02 19:58:18,280 - octoprint.plugins.backup - INFO - ... done creating backup zip.
2021-03-02 19:58:18,289 - octoprint.plugins.webdavbackup - INFO - Backup /home/pi/.octoprint/data/backup/octoprint-backup-20210302-195818.zip created, will now attempt to upload to http://192.168.50.59:8080/OctoPiBackup/
2021-03-02 19:58:18,341 - octoprint.plugin - ERROR - Error while calling plugin webdavbackup
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_webdavbackup/__init__.py", line 78, in on_event
    dav_free = davclient.free()
  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 277, in free
    return WebDavXmlUtils.parse_free_space_response(response.content, self.webdav.hostname)
  File "/home/pi/oprint/lib/python3.7/site-packages/webdav3/client.py", line 946, in parse_free_space_response
    raise MethodNotSupported(name='free', server=hostname)
webdav3.exceptions.MethodNotSupported: Method 'free' not supported for http://192.168.50.59:8080/OctoPiBackup

During handling of the above exception, another exception occurred:

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 106, in on_event
    self._logger.error("An unexpected WebDAV error was encountered: " + exception.args)
TypeError: can only concatenate str (not "tuple") to str
2021-03-02 19:59:05,441 - octoprint.server.util.sockjs - INFO - Client connection closed: ::ffff:192.168.50.123

Any ideas what's causing this, or whether it's a problem with my Webdav config or the plugin? Thank you for your help!

Nawor3565 commented 3 years ago

Wait, I think the issue is that FreeNAS webdavs don't report how much space they have free. Happens on my phone's backup app as well. Do you know if there's a way I can circumvent the error and just try to write the backup file regardless?

Nawor3565 commented 3 years ago

Crap, I somehow managed to open this issue in the wrong repo. Sorry about that!