Skip to content
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

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

Open
Fredy12335 opened this issue Nov 15, 2021 · 1 comment
Open

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

Fredy12335 opened this issue Nov 15, 2021 · 1 comment

Comments

@Fredy12335
Copy link

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!

@thomst08
Copy link

Hey @Fredy12335,

Sorry this has been a while, I've just started looking into this issue.
I've been trying to get this issue to reoccur when restoring a backup but have been unable to do so.
I think because this has been an old issue and the OctoPrint environment has changed a bit since then, and I have started maintaining OctoLight and it is on a new repo, we might have to consider this closed for the moment.

However, if this is still a problem, I am more then happy to look into it some more.
You can submit a new issue if required: https://github.com/thomst08/OctoLight/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants