Problem upgrading to release 1.5.3

What is the problem?

Upgrade to release 1.5.3 fails

What did you already try to solve it?

I have gone through the output in install log but I am lost. I cannot see why iot is failing.

Have you tried running in safe mode?

The printer still works

Did running in safe mode solve the problem?


Complete Logs

octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support! Not log excerpts, complete logs.)


Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

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-SBTv0f/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i --extra-index-url -- setuptools wheel Cython
cwd: None
Complete output (24 lines):
Traceback (most recent call last):
File "/usr/lib/python2.7/", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/", line 72, in _run_code
exec code in run_globals
File "/home/pi/oprint/lib/python2.7/site-packages/pip/", 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/", line 13, in
from pip._internal.cli.autocompletion import autocomplete
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/cli/", 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/", line 7, in
from pip._internal.cli import cmdoptions
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/cli/", 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/", line 18, in
from pip._internal.utils import appdirs
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/utils/", line 16, in
from pip._internal.utils.compat import WINDOWS, expanduser
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_internal/utils/", line 17, in
from pip._vendor.urllib3.util import IS_PYOPENSSL
File "/home/pi/oprint/lib/python2.7/site-packages/pip/_vendor/urllib3/", line 21, in
from logging import NullHandler
ImportError: cannot import name NullHandler

Installing build dependencies: finished with status 'error'
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-SBTv0f/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i --extra-index-url -- setuptools wheel Cython Check the logs for full command output.


Hello @intrepid_aviator !

Could you please format that log excerpt with the </> in the editor top bar?
Or even better: Append the full logs as files to the post.

Try to run this commands in ssh

~/oprint/bin/pip install --force-reinstall --no-cache-dir OctoPrint==1.5.3
sudo octoprint restart

Here are the log files (all the ones that have entries.

uname -a output is:
Linux Ender3 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 armv7l GNU/Linux

root # more /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION="10 (buster)"

Octoprint info : * OctoPrint 1.4.0 running on OctoPi 0.17.0

(upload://p9JoR7BgRmGTJypAqNMBYRqwci6.log) (18.4 KB)

(upload://4tfValQpjoPokTHNE6VGpu5HK0w.log) (19.4 KB)

Uploading: plugin_softwareupdate_console.log... serial.log (148 Bytes)

octoprint.log (18.4 KB) plugin_firmwareupdater_console.log (19.4 KB) plugin_firmwareupdater_console.log (19.4 KB)

Thank you in advance ...

Tried it ...

It failed ... here is the print out of command executed

install.log (4.8 KB)

let's try
~/oprint/bin/pip install --upgrade pip
~/oprint/bin/pip install --upgrade setuptools wheel
and then again
~/oprint/bin/pip install --force-reinstall --no-cache-dir OctoPrint==1.5.3

Hello ,

Unfortunately, It failed again. I seem to have the correct version of pip and setup tools went well, however, upgrade to 1.5.3 did not !

See attache txt file for install messages ...

thanks a million for your help!

install050221.log (6.9 KB)

1 Like

Installing build dependencies ... error
I'm not quite sure what's going on
Could be a software problem, your filesystem could be corrupted or your sd card could be broken.

If nobody else comes up with another idea I would suggest you just backup your Octoprint via the backup and restore function, flash a fresh OctoPi image and restore your backup.
That should fix all software and filesystem related problems.

Apologies for being a pain ... but what do you mean by backing up Octoprint, backup the /home/pi and sub-folders (home directory) or is it something more I need to backup ?

Where do i find instructions for flashing a new OctoPi image, i don't have any personal settings or data to back up so would not be losing anything if I just went to a fresh image apart from enabling static IP !

There's a backup section within OctoPrint's settings that will export all of your configuration and plugins. Instructions for flashing a new image can be found at


I managed to solve this issue with a small workaround, facing it while upgrading from 1.4.0 to 1.5.3.
The issue comes from the logging module, so it needs to be uninstalled first.

pip uninstall logging

Then OctoPrint can be upgraded with the command. I might as well work from the UI but I haven't tried it:

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

Then restart OctoPrint.

Et voilà !


1 Like

Thanks for sharing :slight_smile:

Just for info, I have had exactly same problem. In my case i've worked around it by upgrading to Python3: Upgrade your OctoPrint install to Python 3!

1 Like

The logging module? OctoPrint core certainly doesn't depend on anything like that, it only uses the built-in logging... Maybe an issue caused by some third party plugin dragging in this? :thinking:

Great, it worked. However, it still complains at the end of the install ...

ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
octoprint-printtimegenius 2.2.7 requires logging, which is not installed.

do i need to :slight_smile:

pip install logging

When it finishes ???

Well, that at least explains which plugin is dragging in this weird dependency... I guess it's time to get in touch with the PTG author, ask them why they require this dependency and if there's any way to get rid of it, because apparently it causes issues due to a namespace conflict with Python's own standard logger. edit Done, see here.

Note that this an issue completely outside of OctoPrint itself and rather a problem with this specific dependency and how Python works.