Update OctoPrint plugins via cli?

Hi, I'm trying to update OctoPrint plugins via cli, in webui I get a notification that there are plugins that need to be updated but pip command says that they are already updated, why?

Update Available
There are updates available for the following components:

    DisplayLayerProgress Plugin: V1.23.3
    OctoPod Plugin: 0.2.7
    Print Time Genius Plugin

pip doesn't see any updated, why?

./oprint/bin/pip install -U OctoPrint-OctoPod
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: OctoPrint-OctoPod in ./oprint/lib/python3.7/site-packages (0.2.6)

Documentation page needs to have information how to update plugins via cli, currently this information is missing:
https://docs.octoprint.org/en/master/features/plugins.html

Because the plugins aren't on PyPi and pip doesn't know a thing about the OctoPrint plugin repository.

https://docs.octoprint.org/en/master/bundledplugins/softwareupdate.html#command-line-usage

2 Likes

Thank you Gina! This is what I was looking for but couldn't find it. Thanks once more.

I have run this command:

./oprint/bin/octoprint plugins softwareupdate:update

It showed me this message:

./oprint/bin/octoprint plugins softwareupdate:update
Initializing settings & plugin subsystem...
Invalid syntax in /home/pi/oprint/lib/python3.7/site-packages/octoprint_detailedprogress/__init__.py for plugin detailedprogress
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/core.py", line 599, in _parse_metadata
    root = ast.parse(f.read(), filename=path)
  File "/usr/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_detailedprogress/__init__.py", line 45
    currentData = { "progress": { "completion": 100, "printTimeLeft": 0 } }
                                                                          ^
TabError: inconsistent use of tabs and spaces in indentation
Invalid syntax in /home/pi/oprint/lib/python3.7/site-packages/octoprint_cost/__init__.py for plugin cost
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/core.py", line 599, in _parse_metadata
    root = ast.parse(f.read(), filename=path)
  File "/usr/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_cost/__init__.py", line 30
    def get_template_configs(self):
                                  ^
TabError: inconsistent use of tabs and spaces in indentation
Connected to server...
Update in progress, updating:
	OctoPrint
	DisplayLayerProgress Plugin
	GcodeEditor Plugin
	Plabric
	Print Time Genius Plugin
	Cura Thumbnails
	AstroPrint
	Cancel object
	Consolidate Temp Control
	Dashboard Plugin
	Filament Manager
	File Check Plugin
	Firmware Check Plugin
	Firmware Updater
	Fullscreen Plugin
	OctoPod Plugin
	PortLister
	Preheat Button
	PrusaSlicer Thumbnails
	Simple Emergency Stop
	STL Viewer

It stayed at this message for over an hour and nothing happened, it didn't continue or error out, just sat there... I was patient and left second time for two hours, again nothing happened.

What is going on?

I cannot possibly tell you without logs.

1 Like

Now that I go to webui I can see that all plugins have been updated. I was expecting some progress of plugins being updated in cli output, but it seams like they all have been updated but nothing was being reported in the cli. Is this normal behaviour ?

Here are logs - https://paste.sh/7iSyiMz2#scx1mPWsqUUYTzWKanyXNHU3

No, there should have been progress reports, but I think I know why there weren't. That uses the push socket, and I forgot to update the CLI to accommodate the stricter security on that since a couple versions. Shows you how little this feature gets used. Will look into fixing that for 1.5.0.

This should be fixed in 1.5.0 thanks to

and