As I was printing today I pulled the plug on my printer by accident and the ups was not quick enough to catch it. The raspberry rebooted and when I logged in all third party plugins were missing. It looks like it's in safe mode or like I just installed octoprint. Config.yaml seems intact, all plugins are there but not showing/working. The UI is also all broken there's a dark overlay and the menu is not in the center so every time I open it I gotta delete the element via the Inspect menu and still not see half of it. I guess octoprint is bricked but is there a way I can reinstall it and keep my settings and plugins?
Please tell me you make regular backups? Oh well, you can try to make a manual backup now and save it. It will restore a newly imaged OctoPrint to be exactly the way it was, including settings, scripts, plugins and files at the the time of the backup. I do one every night.
Looks like severe file system corruption on the install.
Try
If that doesn't work, you might be able to get things working again by recreating the venv. I recently published a tool for that (as that will also help migrating to newer Python versions):
See "Recreating a corrupted venv". Note that this does a best effort of extracting a list of your installed plugins from your venv, even if its corrupt. Also note that this tool is very new still and there are no guarantees it will actually fix your issue.
Should this solve your problem, make a backup through OctoPrint's built in Backup plugin and reimagine - the venv is likely not the only thing that saw severe corruption by that power outage. Might also be a good time to replace the SD card, if it's already seen some use (those things die after a while).
And when you make a backup, download it to your PC... If octoprints filesystem is corrupted bad enough, you won't be able to read the backup to restore it
Thanks for all the suggestions, they were pretty helpful. I managed to get it back up and running by reinstalling octoprint which fixed the corrupted UI and creating a new venv which fixed the unknown error when installing plugins. The files storing the plugins were all empty in the backups, but luckily all data and settings was still there so after installing everything by hand it's working great!