Octoprint fails after upgrading RPi from Buster to Bookworm

I just upgraded to a RPi5 with Bookworm and Python 3.11.2
Previously, I had been running Octoprint fine on my RPi4 running Buster with Python 3.7.3

I copied over my ~/.octoprint and ~/octoprint trees and tried to start the daemon by running the usual command:
``~/octoprint/venv/bin/octoprint daemon start```

However it fails to start with the error:

  File "/home/kosowsky/octoprint/venv/bin/octoprint", line 5, in <module>
    from octoprint import main
ModuleNotFoundError: No module named 'octoprint'

In the past I have had no problems transferring Octoprint by just copying over the ~/.octoprint and ~/octoprint trees but that was between 2 RPi's running the same Raspbian version.

I assume the problem is due to the different python versions.

Is there any way to upgrade the Octoprint venv for Octoprint and its plugins without having to reinstall and reconfigure from scratch?

Thanks!

NOTE: I don't use the stock Octopi installation.

I recommend you not just copy the files over like that. Use the octoprint_deploy script available on the download page to freshly install on bookworm.

You can create a backup from a working instance, download the zip, and use that during the initial setup wizard to get all your files, settings, plugins, etc.

Thanks.
Regarding ~/.octoprint do I copy over that tree (which includes gcode uploads, old logs, yaml configs, etc) or is that also backed up and included in the zip?

Those all get backed up as well when you make a backup, unless you exclude them when creating the backup.

Interesting... the only thing that didn't restore was your alpha/beta "Pause Management" app -- which is interesting since it has the url...

# cat ~/.octoprint/data/backup/unknown_plugins_from_restore.json
[{"key": "pause_management", "name": "Pause Management", "url": "https://github.com/jneilliii/OctoPrint-PauseManagement"}]

It seems though that the URL I have to give manually includes archive/0.0.4.zip

Is this a bug with the 'Restore' logic that it can't find the code from githup or is it in how you chose to store the code on github?
Or is this just the way it has to be with alpha/beta code?

Yeah, that's because it hasn't been adopted into the official plugin repo yet, still awaiting review.

Since you have a full backup, download one of the nightly bookworm builds of Octopi. I'm running them on 2 Pi5's without any issues

OK. Thanks. Manually re-installed and it works!

1 Like

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