All 3rd-party plugins GONE... Can't re-install

Current Config

  • OctoPrint 1.7.3
  • Python 3.7.3

NOTE: URL links blocked in log excerpts belowusing "[https]".

After a successful print, I shutdown my system for the night. When I returned the next day to start another print, I noticed that all of the 3rd-party plugins were gone.

I attempted to re-install them one at a time using the OctoPrint console, but all tries failed. Starting with the "Auto Bed Leveling Expert", it failed with the following error:

...
Preparing metadata (setup.py): started
Error!
Could not install plugin from [https]://framagit.org/razer/Octoprint_ABL_Expert/-/archive/0.6/Octoprint_ABL_Expert-0.6.zip, see the log for more details

Review of the log revealed this:

2022-03-05 12:56:39,558 - octoprint.plugins.pluginmanager - INFO - Installing plugin from [https]://framagit.org/razer/Octoprint_ABL_Expert/-/archive/0.6/Octoprint_ABL_Expert-0.6.zip
2022-03-05 12:56:39,913 - octoprint.plugin.core - INFO - Plugin PrintWatch (1.0.18) is disabled.
2022-03-05 12:56:40,021 - octoprint.plugin.core - ERROR - Error fetching plugins from entry points
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/pkg_resources/init.py", line 2798, in get_entry_map
ep_map = self._ep_map
File "/home/pi/oprint/lib/python3.7/site-packages/pkg_resources/init.py", line 2756, in getattr
raise AttributeError(attr)
AttributeError: _ep_map

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/core.py", line 976, in _find_plugins
ignore_uninstalled=ignore_uninstalled,
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/core.py", line 1109, in _find_plugins_from_entry_points
working_set.iter_entry_points(group=group, name=None)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/core.py", line 1098, in wrapped
for entry in gen:
File "/home/pi/oprint/lib/python3.7/site-packages/pkg_resources/init.py", line 656, in
for entry in dist.get_entry_map(group).values()
File "/home/pi/oprint/lib/python3.7/site-packages/pkg_resources/init.py", line 2801, in get_entry_map
self._get_metadata('entry_points.txt'), self
File "/home/pi/oprint/lib/python3.7/site-packages/pkg_resources/init.py", line 2499, in parse_map
raise ValueError("Entry points must be listed in groups")
ValueError: Entry points must be listed in groups
2022-03-05 12:56:42,653 - octoprint.plugins.pluginmanager - ERROR - Could not install plugin from [https]://framagit.org/razer/Octoprint_ABL_Expert/-/archive/0.6/Octoprint_ABL_Expert-0.6.zip
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 900, in _command_install_archive
returncode, stdout, stderr = self._call_pip(pip_args)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 1631, in _call_pip
return self._pip_caller.execute(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 208, in execute
return self.call(command, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 243, in call
all_stderr += process_stderr(p.stderr.readlines(timeout=0.5))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 239, in process_stderr
return process_lines(lines, self._log_stderr)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 230, in process_lines
*map(lambda x: to_unicode(x, errors="replace"), lines)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 498, in _preprocess_lines
return list(map(self._preprocess, lines))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 517, in _preprocess
return to_unicode(clean_ansi(text))
File "/home/pi/oprint/lib/python3.7/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 '\u2502' in position 2: ordinal not in range(256)
2022-03-05 12:56:42,701 - octoprint.plugins.pluginmanager - ERROR - Reason: UnicodeEncodeError('latin-1', ' β”‚ exit code: 1\n', 2, 3, 'ordinal not in range(256)')
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 900, in _command_install_archive
returncode, stdout, stderr = self._call_pip(pip_args)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/pluginmanager/init.py", line 1631, in _call_pip
return self._pip_caller.execute(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 208, in execute
return self.call(command, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 243, in call
all_stderr += process_stderr(p.stderr.readlines(timeout=0.5))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 239, in process_stderr
return process_lines(lines, self._log_stderr)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 230, in process_lines
*map(lambda x: to_unicode(x, errors="replace"), lines)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 498, in _preprocess_lines
return list(map(self._preprocess, lines))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 517, in _preprocess
return to_unicode(clean_ansi(text))
File "/home/pi/oprint/lib/python3.7/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 '\u2502' in position 2: ordinal not in range(256)

Tried to install from the command line and got this:

pip install "[https]://framagit.org/razer/Octoprint_ABL_Expert/-/archive/0.6/Octoprint_ABL_Expert-0.6.zip"
Looking in indexes: [https]://pypi.org/simple, [https]://www.piwheels.org/simple
Collecting [https]://framagit.org/razer/Octoprint_ABL_Expert/-/archive/0.6/Octoprint_ABL_Expert-0.6.zip
Using cached [https]://framagit.org/razer/Octoprint_ABL_Expert/-/archive/0.6/Octoprint_ABL_Expert-0.6.zip (159 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

Γ— python setup.py egg_info did not run successfully.
β”‚ exit code: 1
╰─> [30 lines of output]
Found packages: {'octoprint_ABL_Expert'}
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/pkg_resources/init.py", line 2798, in get_entry_map
ep_map = self._ep_map
File "/home/pi/oprint/lib/python3.7/site-packages/pkg_resources/init.py", line 2756, in getattr
raise AttributeError(attr)
AttributeError: _ep_map

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 36, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-req-build-brohhz8g/setup.py", line 56, in <module>
      setup(**setup_parameters)
    File "/home/pi/oprint/lib/python3.7/site-packages/setuptools/__init__.py", line 152, in setup
      _install_setup_requires(attrs)
    File "/home/pi/oprint/lib/python3.7/site-packages/setuptools/__init__.py", line 142, in _install_setup_requires
      dist = MinimalDistribution(attrs)
    File "/home/pi/oprint/lib/python3.7/site-packages/setuptools/__init__.py", line 134, in __init__
      distutils.core.Distribution.__init__(self, filtered)
    File "/home/pi/oprint/lib/python3.7/site-packages/setuptools/dist.py", line 421, in __init__
      for ep in pkg_resources.iter_entry_points('distutils.setup_keywords'):
    File "/home/pi/oprint/lib/python3.7/site-packages/pkg_resources/__init__.py", line 656, in <genexpr>
      for entry in dist.get_entry_map(group).values()
    File "/home/pi/oprint/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2801, in get_entry_map
      self._get_metadata('entry_points.txt'), self
    File "/home/pi/oprint/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2499, in parse_map
      raise ValueError("Entry points must be listed in groups")
  ValueError: Entry points must be listed in groups
  [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.

Tried to restore a previous backup and got this:

Restoring from backup...

Unpacking backup to /tmp/tmpnm6k7jvw...
Unpacked
Known and installable plugins: z_probe_offset, thespaghettidetective, printscheduler, CalibrationTools, octoapp, ender3v2tempfix, printwatch, ABL_Expert

Installing plugin "z_probe_offset"...

/home/pi/oprint/bin/python3 -m pip install [https]://framagit.org/razer/octoprint_z_probe_offset/-/archive/latest/octoprint_z_probe_offset-latest.zip --no-cache-dir
Removing temporary unpacked folder
Error while running restore
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/backup/init.py", line 1260, in _restore_backup
on_install_plugins(known_plugins)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/backup/init.py", line 299, in on_install_plugins
on_log=on_log,
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/backup/init.py", line 914, in _install_plugin
cls._pip_caller.execute(*pip)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 208, in execute
return self.call(command, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 244, in call
all_stdout += process_stdout(p.stdout.readlines(timeout=0.5))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 236, in process_stdout
return process_lines(lines, self._log_stdout)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 230, in process_lines
*map(lambda x: to_unicode(x, errors="replace"), lines)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 498, in _preprocess_lines
return list(map(self._preprocess, lines))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 517, in _preprocess
return to_unicode(clean_ansi(text))
File "/home/pi/oprint/lib/python3.7/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 characters in position 5-43: ordinal not in range(256)

Restore failed! Check the above output and octoprint[.]log for reasons as to why.
Removing temporary zip

Review of the log after attempted restore revealed this:

2022-03-05 13:07:35,280 - octoprint.plugins.backup - INFO - Unpacking backup to /tmp/tmpnm6k7jvw...
2022-03-05 13:07:35,332 - octoprint.plugins.backup - INFO - Unpacked
2022-03-05 13:07:35,334 - octoprint.plugins.backup - INFO - Known and installable plugins: z_probe_offset, thespaghettidetective, printscheduler, CalibrationTools, octoapp, ender3v2tempfix, printwatch, ABL_Expert
2022-03-05 13:07:35,338 - octoprint.plugins.backup - INFO - Installing plugin z_probe_offset
2022-03-05 13:07:36,489 - octoprint.util.pip - INFO - Using "/home/pi/oprint/bin/python3 -m pip" as command to invoke pip
2022-03-05 13:07:36,491 - octoprint.util.pip - INFO - pip installs to /home/pi/oprint/lib/python3.7/site-packages (writable -> yes), --user flag needed -> no, virtual env -> yes
2022-03-05 13:07:36,493 - octoprint.util.pip - INFO - ==> pip ok -> yes
2022-03-05 13:07:36,494 - octoprint.plugins.backup - INFO - > /home/pi/oprint/bin/python3 -m pip install [https]://framagit.org/razer/octoprint_z_probe_offset/-/archive/latest/octoprint_z_probe_offset-latest.zip --no-cache-dir
2022-03-05 13:07:41,656 - octoprint.plugins.backup - INFO - Removing temporary unpacked folder
2022-03-05 13:07:41,662 - octoprint.plugins.backup - ERROR - Error while running restore
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/backup/init.py", line 1260, in _restore_backup
on_install_plugins(known_plugins)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/backup/init.py", line 299, in on_install_plugins
on_log=on_log,
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugins/backup/init.py", line 914, in _install_plugin
cls._pip_caller.execute(*pip)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 208, in execute
return self.call(command, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 244, in call
all_stdout += process_stdout(p.stdout.readlines(timeout=0.5))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 236, in process_stdout
return process_lines(lines, self._log_stdout)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/commandline.py", line 230, in process_lines
*map(lambda x: to_unicode(x, errors="replace"), lines)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 498, in _preprocess_lines
return list(map(self._preprocess, lines))
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/pip.py", line 517, in _preprocess
return to_unicode(clean_ansi(text))
File "/home/pi/oprint/lib/python3.7/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 characters in position 5-43: ordinal not in range(256)
2022-03-05 13:07:41,706 - octoprint.plugins.backup - INFO - Removing temporary zip

Any help would be greatly appreciated!

Hello @Annubis13 !

Please share the systeminfo bundle.

Please see attached.
octoprint-systeminfo-20220305142907.zip (89.9 KB)

Could it be, that sometime you just power off the instead of shutting it down via the menu?

Yes, that is a strong possibility.
Can it be recovered, or do I have to completely reinstall?
What if I copy the config from another operational OctoPrint system?

It maybe is to assume that the filesystem is corrupted.
So a new install is recommended.

Understood. Thanks for your assistance.

1 Like

Thanks again for your assistance.
I was able to correct the issue with a re-install:

pip install --force-reinstall OctoPrint==1.7.3 --no-cache-dir

~AU

1 Like

The issues with installing plugins and restoring backups are due to the newest pip version (22.0) being incompatible with OctoPrint at the moment. A fix is on the way but not yet released. To avoid issues with this getting in the way you can downgrade pip - pip install pip==21.3.1 until 1.8.0 is released.

1 Like

Any idea what's causing this?:
image

Happens with every plugins install, and on 2 different OctoPrint systems.

...AND, I downgraded pip (per @ Charlie_Powell... AND, the plugins still don't show in the Plugin Manager:

Do you have a new systeminfo bundle/log file? What did this force-reinstall actually fix? Or is the problem still the same?

Not sure what exactly it fixed, but I am no longer receiving the error messages I initially reported (above). Here's the current systeminfo bundle:

octoprint-systeminfo-20220306120212.zip (4.2 KB)

And yes, I am still not getting the plugins installed. The system reports successful, but they don't show in the Plugin Manager.

I'm not really sure what is wrong with your installation. Something has been installed wrong somewhere (not necessarily your fault at all) - it could be a failed update or strange dependency of a plugin. And so when OctoPrint tries to list the plugins out of the environment, it fails to do so as the data is not what Python is expecting.

A reinstall may be the best option - I could probably mess about trying to fix it if it was my install, but it would take ages of investigating everything manually and running blindly at the environment to see what is going on - I don't know what to suggest you do to try and debug.

Thanks @Charlie_Powell ... That's exactly what I did, a fresh new install.