Can't get OctoPrint to work on Ubuntu 24.04

What is the problem?

I've just upgraded this Dell Optiplex 9020 to Ubuntu 24.04 and can't get Octoprint to work again. It was working previously when the machine had 22.04 on it. I'm using a spare ubuntu box, this box is not used for anything else so does not have lots of other software installed.

What did you already try to solve it?

I've tried running octoprint_deploy. I've tried deleting and adding the instance. It always appears to add OK, but comes up as "Failed" in status

Have you tried running in safe mode?

no, how do I do that on Ubuntu?

Did running in safe mode solve the problem?

NO

Systeminfo Bundle

I'm getting this error on trying to add an instance:
ModuleNotFoundError: No module named 'octoprint'

Diagnostics from octoprint_deploy:

Select an option: 8
octoprint_deploy diagnostic information. Please provide ALL output for support help


/etc/octoprint_deploy


haproxy: true
streamer: ustreamer
octoexec: /home/johno/OctoPrint/bin/octoprint
octopip: /home/johno/OctoPrint/bin/pip


/etc/octoprint_instances


instance:Creality1 port:5000 udev:true


/etc/octoprint_cameras


camera:cam_Creality1 port:8001 udev:true


/etc/udev/rules.d/99-octoprint.rules


KERNELS=="3-8:1.0",SUBSYSTEM=="tty",SYMLINK+="octo_Creality1"
SUBSYSTEM=="video4linux", ATTRS{serial}=="2431ZB20ZPG8", ATTR{index}=="0", SYMLINK+="cam_Creality1"
lrwxrwxrwx 1 root root 7 Dec 2 11:30 /dev/octo_Creality1 -> ttyUSB0
lrwxrwxrwx 1 root root 6 Dec 2 11:30 /dev/cam_Creality1 -> video0


Γ— Creality1.service - The snappy web interface for your 3D printer
Loaded: loaded (/etc/systemd/system/Creality1.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Mon 2024-12-02 11:30:23 NZDT; 2min 46s ago
Duration: 316ms
Main PID: 15636 (code=exited, status=1/FAILURE)
CPU: 20ms

Dec 02 11:30:22 johno-OptiPlex-9020 systemd[1]: Started Creality1.service - The snappy web interface for your 3D printer.
Dec 02 11:30:22 johno-OptiPlex-9020 octoprint[15636]: Traceback (most recent call last):
Dec 02 11:30:22 johno-OptiPlex-9020 octoprint[15636]: File "/home/johno/OctoPrint/bin/octoprint", line 5, in
Dec 02 11:30:22 johno-OptiPlex-9020 octoprint[15636]: from octoprint import main
Dec 02 11:30:22 johno-OptiPlex-9020 octoprint[15636]: ModuleNotFoundError: No module named 'octoprint'
Dec 02 11:30:23 johno-OptiPlex-9020 systemd[1]: Creality1.service: Main process exited, code=exited, status=1/FAILURE
Dec 02 11:30:23 johno-OptiPlex-9020 systemd[1]: Creality1.service: Failed with result 'exit-code'.
Traceback (most recent call last):
File "/home/johno/OctoPrint/bin/octoprint", line 5, in
from octoprint import main
ModuleNotFoundError: No module named 'octoprint'
Traceback (most recent call last):
File "/home/johno/OctoPrint/bin/octoprint", line 5, in
from octoprint import main
ModuleNotFoundError: No module named 'octoprint'


● cam_Creality1.service - the OctoPi(buntu) ustreamer daemon with the user specified config
Loaded: loaded (/etc/systemd/system/cam_Creality1.service; enabled; preset: enabled)
Active: active (running) since Mon 2024-12-02 11:30:23 NZDT; 2min 46s ago
Main PID: 15786 (main)
Tasks: 10 (limit: 9335)
Memory: 1.6M (peak: 2.3M)
CPU: 604ms
CGroup: /system.slice/cam_Creality1.service
└─15786 /home/johno/ustreamer/ustreamer -d /dev/cam_Creality1 -s 0.0.0.0 -m MJPEG -r 640x480 -f 5 -p 8001 --device-timeout 8 --device-error-delay 8

Dec 02 11:30:23 johno-OptiPlex-9020 ustreamer[15786]: -- INFO [6666.996 ] -- CAP: Using format: MJPEG
Dec 02 11:30:23 johno-OptiPlex-9020 ustreamer[15786]: -- INFO [6667.015 ] -- CAP: Using HW FPS: 5
Dec 02 11:30:23 johno-OptiPlex-9020 ustreamer[15786]: -- ERROR [6667.015 ] -- CAP: Device doesn't support setting of HW encoding quality parameters
Dec 02 11:30:23 johno-OptiPlex-9020 ustreamer[15786]: -- INFO [6667.015 ] -- CAP: Using IO method: MMAP
Dec 02 11:30:23 johno-OptiPlex-9020 ustreamer[15786]: -- INFO [6667.015 ] -- CAP: Requested 5 device buffers, got 5
Dec 02 11:30:23 johno-OptiPlex-9020 ustreamer[15786]: -- INFO [6667.019 ] -- CAP: Capturing started
Dec 02 11:30:23 johno-OptiPlex-9020 ustreamer[15786]: -- INFO [6667.020 ] -- Switching to HW encoder: the input is (M)JPEG ...
Dec 02 11:30:23 johno-OptiPlex-9020 ustreamer[15786]: -- INFO [6667.020 ] -- Using JPEG quality: encoder default
Dec 02 11:30:23 johno-OptiPlex-9020 ustreamer[15786]: -- INFO [6667.020 ] -- Creating pool JPEG with 1 workers ...
Dec 02 11:30:23 johno-OptiPlex-9020 ustreamer[15786]: -- INFO [6667.020 ] -- Capturing ...


● haproxy.service - HAProxy Load Balancer
Loaded: loaded (/usr/lib/systemd/system/haproxy.service; enabled; preset: enabled)
Active: active (running) since Mon 2024-12-02 11:30:21 NZDT; 2min 48s ago
Docs: man:haproxy(1)
file:/usr/share/doc/haproxy/configuration.txt.gz
Main PID: 15307 (haproxy)
Status: "Ready."
Tasks: 5 (limit: 9335)
Memory: 39.5M (peak: 40.1M)
CPU: 77ms
CGroup: /system.slice/haproxy.service
β”œβ”€15307 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -S /run/haproxy-master.sock
└─15310 /usr/sbin/haproxy -Ws -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -S /run/haproxy-master.sock

Dec 02 11:30:21 johno-OptiPlex-9020 systemd[1]: Starting haproxy.service - HAProxy Load Balancer...
Dec 02 11:30:21 johno-OptiPlex-9020 haproxy[15307]: [NOTICE] (15307) : New worker (15310) forked
Dec 02 11:30:21 johno-OptiPlex-9020 haproxy[15307]: [NOTICE] (15307) : Loading success.
Dec 02 11:30:21 johno-OptiPlex-9020 systemd[1]: Started haproxy.service - HAProxy Load Balancer.


octoprint_deploy 1.0.11


  1. Add instance 4) Add PiCam 7) Backup Menu
  2. Delete instance 5) Delete Camera 8) Update
  3. Add USB Camera 6) Utilities 9) Quit
    Select operation:

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

WRITE HERE

Additional information about your setup

OctoPrint version, Don't know
OctoPi version, Don't know
printer, Creality Ender 3 V3 SE.
firmware , 1.0.7
browser, Firefox
operating system, Ubuntu 24.04
... as much data as possible

WRITE HERE

What version of Python?

Python 3.12
Would upgrading to 24.04.have changed that?

more precisely, it is python 3.12.3

Typically, a newer version of a distribution (in your case, 22.04 to 24.04) will have updated packages as well. OctoPrint is sensitive to the version of Python so I asked you to include that information (I believe 3.12 is OK but 3.13 might need a newer version of OctoPrint).

Yes, I've been wondering what might have changed with the upgrade to upset things. Or if something might have got corrupted along the way.
If necessary I can wipe the whole machine and start over, it is only being used as a server for Octoprint so there is nothing else of value on it.

something wrong with your venv setup?

I'm not what you would call an expert with ubuntu, far from it, so I don't know anything about venv.