Code Monkey home page Code Monkey logo

octoprint-webdavbackup's People

Contributors

edekeijzer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

andypc54

octoprint-webdavbackup's Issues

Issue installing plugin

Hi,

I am having an issue installing the plugin. It goes through what looks to be a successful install minus one section of the log and when it is done, the "Plugin Management Log" shows " 'Install Unknown' A restart is required".

I am trying to install on Octoprint 1.9.2, running the latest version of python.

Here is the log:

Installing plugin "WebDAV Backup" from https://github.com/edekeijzer/OctoPrint-WebDavBackup/archive/main.zip...
/usr/bin/python3 -m pip --disable-pip-version-check install file:///tmp/tmprca13mue/OctoPrint-WebDavBackup-main.zip --no-cache-dir
Processing /tmp/tmprca13mue/OctoPrint-WebDavBackup-main.zip
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: OctoPrint in /usr/lib/python3.10/site-packages (from WebDAV-Backup==0.5.1) (1.9.2)
Collecting webdavclient3
Downloading webdavclient3-3.14.6.tar.gz (23 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting lxml
Downloading lxml-4.9.3.tar.gz (3.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 722.1 kB/s eta 0:00:00
Preparing metadata (setup.py): started
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
Building lxml version 4.9.3.
Building without Cython.
**Error: Please make sure the libxml2 and libxslt development packages are installed.
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.**
Preparing metadata (setup.py): finished with status 'error'
Looks like the plugin was already installed. Forcing a reinstall.
/usr/bin/python3 -m pip --disable-pip-version-check install file:///tmp/tmprca13mue/OctoPrint-WebDavBackup-main.zip --no-cache-dir --ignore-installed --force-reinstall --no-deps
Processing /tmp/tmprca13mue/OctoPrint-WebDavBackup-main.zip
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: WebDAV-Backup
Building wheel for WebDAV-Backup (setup.py): started
Building wheel for WebDAV-Backup (setup.py): finished with status 'done'
Created wheel for WebDAV-Backup: filename=WebDAV_Backup-0.5.1-py3-none-any.whl size=7258 sha256=1ced7db7f945e55c2dca74912d2d701afbef3c2bf5b63b07d9922b33c3c5e19f
Stored in directory: /tmp/pip-ephem-wheel-cache-kqa2ndn6/wheels/db/28/db/3aa697e6b2d8879e8b0d655517549d54dfd8688b632079f17e
Successfully built WebDAV-Backup
Installing collected packages: WebDAV-Backup
Successfully installed WebDAV-Backup-0.5.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Done!

Plugin does not appear after installation - setup procedure buggy?

This appears after installation of the plugin and also it is not visible in the software manager. So the installation procedure seems to be buggy. OctoPrint 1.8.3 on OctoPI 0.17

Pluginmanagementlog
Unknown installiert:

image

Attached the log, seems to be the WebDAV client but it should not run into a missing entry in the Software Manager in my oppinion.
octoprint.log

Local volumes/NAS servers

Is there a way you could add (or adapt) the ability to store things to a local drive (not the Pi, but the one running the web interface) or a NAS server on the local network (automatically, not by manual download)?

I rarely trust, use, or rely on "cloud" based stuff if I can avoid it - someone else is in control, has your data, and in times of need the connection to an outside source may not be available.

Error: Please make sure the libxml2 and libxslt development packages are installed.

Hi there,

trying to install this plugin on raspberry pi 4 python -V 3.8.8 octoprint 1.6.1

i getting this error:

Error: Please make sure the libxml2 and libxslt development packages are installed.

Trying to install manually pip install libxml2 and pip install libxslt

but get these errors:

pip install libxslt
ERROR: Could not find a version that satisfies the requirement libxslt (from versions: none)
ERROR: No matching distribution found for libxslt
pip install libxml2
ERROR: Could not find a version that satisfies the requirement libxml2 (from versions: none)
ERROR: No matching distribution found for libxml2

So what is the workflow to install it?

Cannot Find in plug-in repo through octoprint and receiving this error when attempting to install manually.

ERROR: Command errored out with exit status 1:
command: /home/pi/oprint/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aiJiO3/lxml/setup.py'"'"'; file='"'"'/tmp/pip-install-aiJiO3/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-aiJiO3/lxml/pip-egg-info
cwd: /tmp/pip-install-aiJiO3/lxml/
Complete output (3 lines):
Building lxml version 4.6.2.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are installed.

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Error!
Could not parse output from pip, see plugin_pluginmanager_console.log for generated output

Synology NAS WebDAV server does not support checking of remote resources - possible solution

The latest WebDavBackup 0.3.0 still cannot upload to a Synology NAS (DSM 6.2.3 latest, WebDAV server 2.3.4-0025).

Clearing the new 'check available space' option in the Connections Setting page gives this error when attempting to upload to the Synology:

2021-03-09 16:23:22,078 - octoprint.plugins.webdavbackup - ERROR - Server did not return WebDAV root, something is probably wronkg with your settings.

[Note minor spelling error for 'wrong'.]

I have identified an option switch with the webdav3.client API which does allow the upload of backup files to a Synology.

Also if your server does not support check it is possible to disable it:

options = {
...
'disable_check': True
}
client = Client(options)
By default checking of remote resources is enabled.

I have added this "'disable_check': True" value to the /home/pi/oprint/lib/python3.7/site-packages/octoprint_webdavbackup/_init_.py file in the davoptions section. Backups to the Synology now work.

This setting has the disadvantage of disabling the recursive directory searching and seemingly cannot create new sub-directories if they do not already exist.

However as a workaround it is usable if the desired remote directory already exists. Non-admin users can only upload to their home directory /homes/ tree.

Could you consider adding a new optional 'compatibility' switch to the Connections Setting page which passes through a 'disable_check' setting rather than the user having to hardcode it.

This option may help users of other WebDav servers who have similar connections issues.

Regards,
Andy

Can't get Plugin to work for Synology NAS WebDAV server

My Environment:
Raspberry Pi 4 with OctoPi 0.18.0 and OctoPrint 1.8.3
Synology DS920+ and DSM 7.1.1-42962 Update 1
WebDav Folder for Octoprint: /volume1/backup/OctoPrint/Backups (Volumes don't have to be in the Backup Path)

My Plugin-Settings:
Server: "https://<SERVERNAME>.myds.me:5006" (Let's Encrypt Certificate)
Username: "OctoPrint" (Dedicated User with permission for WebDav and Destination Folder)
Password: Only a "!", others upper and lower case
Verify certificate: Checked
Check available space: Unchecked
Backup path: "/backup/OctoPrint/Backups/"
Backup filename: "" (Empty)
Upload timelapse videos: Unchecked
Remove after upload: Unchecked

Error i'm getting:

2022-09-28 21:11:51,625 - octoprint.plugins.backup - INFO - Creating backup zip at /home/pi/.octoprint/data/backup/.Creality-Ender-5-Plus-backup-20220928-211151.zip (excluded: uploads,timelapse,timelapse_tmp)...
2022-09-28 21:11:59,957 - octoprint.plugins.backup - INFO - ... done creating backup zip.
2022-09-28 21:11:59,983 - octoprint.plugins.webdavbackup - INFO - Backup /home/pi/.octoprint/data/backup/Creality-Ender-5-Plus-backup-20220928-211151.zip created, will now attempt to upload to https://SERVERNAME.myds.me:5006
2022-09-28 21:11:59,989 - octoprint.plugins.webdavbackup - DEBUG - Filename for upload: Creality-Ender-5-Plus-backup-20220928-211151.zip
2022-09-28 21:11:59,990 - octoprint.plugins.webdavbackup - DEBUG - Upload location: /backup/OctoPrint/Backups/Creality-Ender-5-Plus-backup-20220928-211151.zip
2022-09-28 21:11:59,990 - octoprint.plugins.webdavbackup - DEBUG - Not checking free space, just try to check the WebDAV root.
2022-09-28 21:12:00,069 - octoprint.plugins.webdavbackup - ERROR - Server did not return WebDAV root, something is probably wrong with your settings.

Not working on OctoPrint 1.5.3 Octopi version 0.17.0

Also not working on Not working on OctoPrint 1.5.3 Octopi version 0.17.0.

Installed via plugin manager and via URL. both says instalation succesfull. And i get message to restart octopi. But after restarting, plugin not available.

cant get the plugin to work

Hi there

first of all many thanks for this nice piece of software! I installed it via the Plugin-Manager on my Octoprint (0.18.0-1.8.2-20220809123918). I am running Web-DAV on my Synology and created an extra user for it. This user has access to a share on the NAS.
Bildschirmfoto 2022-09-01 um 13 24 27

I couldnt find out in which intervals the backups are being created? I would like to check if the path is working and the backups could be stored on the share.

I also use the plugin Backup-Scheduler (https://plugins.octoprint.org/plugins/backupscheduler/) but it seems that it only saves it to the Octoprint-server itself.

The goal is that the backups are written on the share and not the Octoprint-server itself.

many thanks for your help

Andrew

Not working Backup to sinology webdav server on OctoPrint 1.5.2 Python 3.7.3 OctoPi 0.17.0

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

Enhancement: upload timelapse

Since there is an event for capturing images and finishing rendering the timelapse movie, why not automatically upload the movie after it's finished?

Plugin Not working - Synology WEBDAV ERROR - Error while calling plugin webdavbackup

OctoPrint 1.5.3
Python 3.7.3
OctoPi 0.18.0

Log snippet
2021-01-26 21:30:43,923 - octoprint.plugins.webdavbackup - INFO - Backup /home/pi/.octoprint/data/backup/octoprint-backup-20210126-213043.zip created, will now attempt to upload to http://x.x.x.x:5005/OctoPrint_Backups/Ender_3_v2/
2021-01-26 21:30:58,545 - 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 542, in request
resp = self.send(prep, **send_kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/requests/sessions.py", line 655, 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 706, in urlopen
chunked=chunked,

'Method "free" not supported' error

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

It seems to be a problem with FreeNAS webdavs not reporting how much free space they have. Do you know if there's a way I can circumvent the error and just try to write the backup file regardless? Thanks for your help!

Log says backup successful but no file is made

OctoPrint 1.5.3 Python 3.7.3 OctoPi 0.18.0

The log says that the backup was finished successfully - but the file never seems to be created.

Any ideas why? I'm sure the permissions are correct.

Uploaded files are missing

I am trying to get webdav backup plugin working, I have set the server name to my nextcloud server and generated a username and password within nextcloud. I have set the backup path as /OctoPrint/Backups/%Y but nothing for the filename. When I do a manual backup and watch the logs, the file is successful to my server, but when go to nextcloud and look for the files, there is nothing there.

What am I missing? Why do I not see the files after they are uploaded

Thanks

[REQUEST]: Test path

Please add the ability to test the path/verify permissions. Perhaps even allow navigation to the folder once the base URL has been entered and tested.

ValueError: math domain error

OctoPrint v1.5.3, Python v3.7.3, OctoPi v0.18.0

Fresh install on Raspberry 4

WebDAV server OwnCloud v10.5.0.10 with total data size of 7,8T, used 4,8T and available 2,6T

Could it be that my OwnCloud reports storage space that is too large to compute? If so, could this be handled?

021-02-11 18:32:51,903 - 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 109, in on_event
self._logger.info("Free space on server: " + _convert_size(dav_free))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_webdavbackup/__init__.py", line 46, in _convert_size
i = int(math.floor(math.log(size_bytes, 1024)))
ValueError: math domain error

Regards,

/Jonas...

No access to QNAP WebDAV

After setup an WebDAV on my QNAP TS-453A and using WebDavBackup I wasn't able to upload any file to the server. Looking into the log file I did found the following:

_**2021-04-02 17:28:56,737 - octoprint.plugins.backup - INFO - Creating backup zip at /octoprint/octoprint/data/backup/.octoprint-backup-20210402-172856.zip (excluded: -)...
2021-04-02 17:28:56,906 - octoprint.plugins.backup - INFO - ... done creating backup zip.
2021-04-02 17:28:58,491 - octoprint.plugins.webdavbackup - INFO - Backup /octoprint/octoprint/data/backup/octoprint-backup-20210402-172856.zip created, will now attempt to upload to https://192.168.178.201:5001/3D/
2021-04-02 17:28:58,510 - py.warnings - WARNING - /usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '192.168.178.201'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
warnings.warn(

2021-04-02 17:28:58,534 - octoprint.plugins.webdavbackup - ERROR - Server did not return WebDAV root, something is probably wrong with your settings.**_

Is there anything what needs to be done on the server? Or on the setting of OctoPi?

Best regards
Joerg

Octoprint 1.5.3 - plugin not working as it should

Tried to install the plugin through zip file link but there were libraries missing.
After installing these libraries (libxml2-dev libxslt1-dev) the plugin installed fine.

Unfortunatly the plugin did not show up in the config menu.
Log file stated:

Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 1298, in _import_plugin
    module = _load_module(module_name, spec)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 69, in _load_module
    return imp.load_module(name, f, filename, details)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_webdavbackup/__init__.py", line 6, in <module>
    from webdav3.client import Client
  File "/home/pi/oprint/local/lib/python2.7/site-packages/webdav3/client.py", line 10, in <module>
    from urllib.parse import unquote, urlsplit, urlparse
ImportError: No module named parse

Fixed with changing the following in /home/pi/oprint/local/lib/python2.7/site-packages/webdav3/client.py
from urllib.parse import unquote, urlsplit, urlparse
to

try:
    from urllib.parse import unquote, urlsplit, urlparse
except ImportError:
     from urlparse import unquote, urlsplit, urlparse

After Octoprint restart another error (and one after that too):

  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 1298, in _import_plugin
    module = _load_module(module_name, spec)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/core.py", line 69, in _load_module
    return imp.load_module(name, f, filename, details)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_webdavbackup/__init__.py", line 6, in <module>
    from webdav3.client import Client
  File "/home/pi/oprint/local/lib/python2.7/site-packages/webdav3/client.py", line 20, in <module>
    from webdav3.connection import WebDAVSettings
  File "/home/pi/oprint/local/lib/python2.7/site-packages/webdav3/connection.py", line 4, in <module>
    from webdav3.urn import Urn
  File "/home/pi/oprint/local/lib/python2.7/site-packages/webdav3/urn.py", line 2, in <module>
    from urllib.parse import unquote, quote, urlsplit
ImportError: No module named parse

Fixed with changing the following in /home/pi/oprint/local/lib/python2.7/site-packages/webdav3/urn.py
from urllib.parse import unquote, quote, urlsplit
to

try:
    from urllib.parse import unquote, quote, urlsplit
except ImportError:
     from urlparse import unquote, urlparse
     from urllib import quote

The plugin now shows up in the config menu. It still shows an error in octoprint.log though.

Traceback (most recent call last):
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate/__init__.py", line 198, in _get_configured_checks
    hook_checks = hook()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/__init__.py", line 1890, in wrapper
    return f(*args, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_webdavbackup/__init__.py", line 89, in get_update_information
    displayName=self._plugin_name,
NameError: global name 'self' is not defined

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.