If you get something like this upon attempting to install or uninstall a plugin via OctoPrint's plugin manager or on attempting to perform an upgrade via OctoPrint's software update plugin:
2018-07-15 17:02:37,694 - octoprint.plugins.pluginmanager - ERROR - Could not install plugin from <url>
Traceback (most recent call last):
File "/home/pi/OctoPrint/venv/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/__init__.py", line 348, in command_install
returncode, stdout, stderr = self._call_pip(pip_args)
File "/home/pi/OctoPrint/venv/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/__init__.py", line 652, in _call_pip
return self._pip_caller.execute(*args)
File "/home/pi/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/util/pip.py", line 172, in execute
return self.call(command, **kwargs)
File "/home/pi/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/util/commandline.py", line 83, in call
p = sarge.run(command, **kwargs)
File "/home/pi/OctoPrint/venv/local/lib/python2.7/site-packages/sarge/__init__.py", line 1462, in run
p.run(input=input, async_=async_)
File "/home/pi/OctoPrint/venv/local/lib/python2.7/site-packages/sarge/__init__.py", line 1071, in run
self.run_node(node, input=input, async_=False)
File "/home/pi/OctoPrint/venv/local/lib/python2.7/site-packages/sarge/__init__.py", line 1187, in run_node
result = getattr(self, method)(node, input, async_)
File "/home/pi/OctoPrint/venv/local/lib/python2.7/site-packages/sarge/__init__.py", line 1333, in run_command_node
node.cmd.run(input=input, async_=async_)
File "/home/pi/OctoPrint/venv/local/lib/python2.7/site-packages/sarge/__init__.py", line 655, in run
self.process = p = Popen(self.args, **self.kwargs)
TypeError: __init__() got an unexpected keyword argument 'async'
then this is caused by a backwards incompatible version of the sarge
dependency (version 0.1.5). You'll have to manually downgrade sarge
to a compatible version (version 0.1.4). Assuming you installed OctoPrint into a venv
located at /home/pi/OctoPrint
(as visible in the log snippet above), do this:
- Log into your OctoPrint server via SSH or via attached monitor & keyboard
source /home/pi/OctoPrint/venv/activate
pip install sarge==0.1.4
- Restart OctoPrint
That should make everything work again. 1.3.9 will have a fix for this in place.
(If your OctoPrint installation path is a different one, substitute accordingly.)