Skip to content

Octoprint backup and restore problem because of the plugin. #35

@Fredy12335

Description

@Fredy12335

Hi!
I backed up my entire system with Octoprint backup. I replaced the SD card in the Raspberry pi. I reinstalled the all system. And after booting I tried to restore the system using the restore option of octoprint. This failed and I got the following error:

2021-11-15 17:54:15,281 - octoprint.plugins.backup - ERROR - Error while running restore
Traceback (most recent call last):
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/plugins/backup/__init__.py", line 1260, in _restore_backup
    on_install_plugins(known_plugins)
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/plugins/backup/__init__.py", line 292, in on_install_plugins
    self.__class__._install_plugin(
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/plugins/backup/__init__.py", line 914, in _install_plugin
    cls._pip_caller.execute(*pip)
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/util/pip.py", line 208, in execute
    return self.call(command, **kwargs)
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/util/commandline.py", line 243, in call
    all_stderr += process_stderr(p.stderr.readlines(timeout=0.5))
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/util/commandline.py", line 239, in process_stderr
    return process_lines(lines, self._log_stderr)
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/util/commandline.py", line 229, in process_lines
    processed = self._preprocess_lines(
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/util/pip.py", line 498, in _preprocess_lines
    return list(map(self._preprocess, lines))
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/util/pip.py", line 517, in _preprocess
    return to_unicode(clean_ansi(text))
  File "/home/pi/OctoPrint/venv/lib/python3.9/site-packages/octoprint/util/commandline.py", line 57, in clean_ansi
    return _ANSI_REGEX.sub(b"", line.encode("latin1")).decode("latin1")
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2018' in position 32: ordinal not in range(256)

Steps to reproduce the behavior:

  1. Install octolight.
  2. Go to octoprint create backup
  3. Make a new fresh system and try to restore.
  4. See error
  • OctoPrint or OctoPi version: 1.7.2
  • Browser chrome
  • Plugin version lastest
  • PI 3b+

I "solved" the problem by deleting this line: {"key": "octolight", "name": "OctoLight", "url": "https://github.com/gigibu5/OctoLight"}, from the backup.zip: plugin_list.json file.
After this the restore is completed. (but the plugin is missed)

I attached the log
octoprint.log

I you need any infos/files let me know.
SFMBE.

Thanks!

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