Failed update via the WebUI (zero byte /home/pi/oprint/bin/octoprint:)

What is the problem?

Updated to OctoPrint 1.8.7 this morning via the webUI and it didn't come back up.

Mar 3 09:47:43 octopi systemd[1667]: octoprint.service: Failed to execute command: Exec format error
Mar 3 09:47:43 octopi systemd[1667]: octoprint.service: Failed at step EXEC spawning /home/pi/oprint/bin/octoprint: Exec format error
Mar 3 09:47:43 octopi systemd[1]: octoprint.service: Main process exited, code=exited, status=203/EXEC
Mar 3 09:47:43 octopi systemd[1]: octoprint.service: Failed with result 'exit-code'.

Turns out /home/pi/oprint/bin/octoprint was zero bytes. There was plenty of disk space so that wasn't the issue.

What did you already try to solve it?

~/oprint/bin/pip install --ignore-installed OctoPrint

Now i have a non-zero byte OctoPrint - which leads to another problem:

Could not initialize environment detector: version conflict: '/home/pi/oprint/lib/python3.7/site-packages/psutil/_psutil_linux.cpython-37m-arm-linux-gnueabihf.so' C extension module was built for another version of psutil (5.8.0 instead of 5.9.4); you may try to 'pip uninstall psutil', manually remove /home/pi/oprint/lib/python3.7/site-packages/psutil/_psutil_linux.cpython-37m-arm-linux-gnueabihf.so or clean the virtual env somehow, then reinstall

I tried:
~/oprint/bin/pip install --ignore-installed psutil to

Have you tried running in safe mode?

won't start so can't get to safe mode

Did running in safe mode solve the problem?

NO

Systeminfo Bundle

It won't even start, cant get this far.

Additional information about your setup

Raspberry Pi 3b that was initially built with the Pi imager and has been working fine for 3-ish years.

At this point I'm thinking to just re-image the Pi?

Could you try:

~/oprint/bin/pip install --force-reinstall OctoPrint

Good call... Gave it a try, getting the same result:

Could not initialize environment detector: version conflict: '/home/pi/oprint/lib/python3.7/site-packages/psutil/_psutil_linux.cpython-37m-arm-linux-gnueabihf.so' C extension module was built for another version of psutil (5.8.0 instead of 5.9.4); you may try to 'pip uninstall psutil', manually remove /home/pi/oprint/lib/python3.7/site-packages/psutil/_psutil_linux.cpython-37m-arm-linux-gnueabihf.so or clean the virtual env somehow, then reinstall
There was a fatal error initializing the platform.

But that exercise makes me wonder if I have something broken in my pip cache. going to flush and try again.

Ok here's what fixed it:

~/oprint/bin/pip install --ignore-installed psutil==5.8.0

It's up and running now.

1 Like

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