Update 1.6.1 - 1.7.3 exit status 1

What is the problem?

I get an error trying to update OctoPrint. I have searched for a while on the forums without finding a similar error message (as far as I could understand them).

What did you already try to solve it?

I tried a python script provided in a post to clean up logging, but I had no luck with it.

Systeminfo Bundle

browser.user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 connectivity.connection_check: 1.1.1.1:53 connectivity.connection_ok: True connectivity.enabled: True connectivity.online: True env.hardware.cores: 4 env.hardware.freq: 1500.0 env.hardware.ram: 4041732096 env.os.bits: 32 env.os.id: linux env.os.platform: linux2 env.plugins.pi_support.model: Raspberry Pi 4 Model B Rev 1.1 env.plugins.pi_support.octopi_version: 0.17.0 env.plugins.pi_support.throttle_state: 0x0 env.python.pip: 19.3.1 env.python.version: 2.7.16 env.python.virtualenv: True octoprint.safe_mode: False octoprint.version: 1.6.1 systeminfo.generator: zipapi

ERROR MESSAGE

PS: I stripped down links as I am a new user.

Updating, please wait.
/home/pi/oprint/bin/python2 -m pip --disable-pip-version-check install https://github.com/OctoPrint/OctoPrint/archive/1.7.3.zip --no-cache-dir
Looking in indexes: Simple index, piwheels - Simple index
Collecting githubcom/OctoPrint/OctoPrint/archive/1.7.3.zip
Downloading githubcom/OctoPrint/OctoPrint/archive/1.7.3.zip
Requirement already satisfied: OctoPrint-FileCheck>=2021.2.23 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (2021.2.23)
Collecting OctoPrint-FirmwareCheck>=2021.10.11
Downloading piwheelsorg/simple/octoprint-firmwarecheck/OctoPrint_FirmwareCheck-2021.10.11-py2.py3-none-any.whl
Requirement already satisfied: OctoPrint-PiSupport>=2021.10.28 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (2021.10.28)
Requirement already satisfied: markupsafe<2.0,>=1.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (1.1.1)
Requirement already satisfied: markdown<3.2,>=3.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (3.1.1)
Requirement already satisfied: wrapt<1.13,>=1.12.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (1.12.1)
Collecting flask<2,>=1.1.4
Downloading files.pythonhostedorg/packages/e8/6d/994208daa354f68fd89a34a8bafbeaab26fda84e7af1e35bdaed02b667e6/Flask-1.1.4-py2.py3-none-any.whl (94kB)
Collecting Jinja2<3,>=2.11.3
Downloading files.pythonhostedorg/packages/7e/c2/1eece8c95ddbc9b1aeb64f5783a9e07a286de42191b7204d67b7496ddf35/Jinja2-2.11.3-py2.py3-none-any.whl (125kB)
Requirement already satisfied: Flask-Login<0.6,>=0.5 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (0.5.0)
Requirement already satisfied: Flask-Babel<2,>=1.0 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (1.0.0)
Requirement already satisfied: Flask-Assets<3,>=2.0 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (2.0)
Requirement already satisfied: werkzeug<2,>=1.0.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (1.0.1)
Requirement already satisfied: itsdangerous<2,>=1.1.0 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (1.1.0)
Requirement already satisfied: cachelib<0.2,>=0.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.7.3) (0.1)
Collecting PyYAML<6,>=5.4.1
Downloading files.pythonhostedorg/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz (175kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /home/pi/oprint/bin/python2 /home/pi/oprint/local/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-hr8GTz/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i Simple index --extra-index-url piwheels - Simple index -- setuptools wheel Cython
cwd: None
Complete output (24 lines):
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/pi/oprint/lib/python2.7/site-packages/pip/main.py", line 16, in
from pip._internal.main import main as _main # isort:skip # noqa
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/main.py", line 13, in
from pip._internal.cli.autocompletion import autocomplete
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.py", line 11, in
from pip._internal.cli.main_parser import create_main_parser
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/cli/main_parser.py", line 7, in
from pip._internal.cli import cmdoptions
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/cli/cmdoptions.py", line 25, in
from pip._internal.locations import USER_CACHE_DIR, get_src_prefix
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/locations.py", line 18, in
from pip._internal.utils import appdirs
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/utils/appdirs.py", line 16, in
from pip._internal.utils.compat import WINDOWS, expanduser
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/utils/compat.py", line 17, in
from pip._vendor.urllib3.util import IS_PYOPENSSL
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_vendor/urllib3/init.py", line 21, in
from logging import NullHandler
ImportError: cannot import name NullHandler

ERROR: Command errored out with exit status 1: /home/pi/oprint/bin/python2 /home/pi/oprint/local/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-hr8GTz/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i pypiorg/simple --extra-index-url piwheelsorg/simple -- setuptools wheel Cython Check the logs for full command output.
The update did not finish successfully. Please consult octoprint.log and plugin_softwareupdate_console.log for details.

Additional information about your setup

OctoPrint version 1.6.1, OctoPi version 0.17.0, printer Prusa Mini+, firmware 4.3.4, browser Chrome, operating system Win 10, RaspBerry Pi 4B 8GB connected with WiFi
1 Like

Thank you @Charlie_Powell

I believe this is the python script I mentioned having tried without success.
I did not try running it by ssh’ing my octoPi, only by running the script as shown in the example.

Regards A

Could this have to do with my OctoPi still running 0.17 and Python 2?
I will try to update to OctoPi 0.18, latest stable build and see if OctoPrint will update fine then.

The direct solution is in the above link, but yes it is only a problem that impacts old Python 2 installs.

You can find the instructions for Upgrading to Python 3 below:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.