Failed Update from 1.3.5 to 1.3.8

What is the problem?
Using the OctoPriint GUI it notifies that there is an update, I select to proceed with the update and it fails.
What did you already try to solve it?
Rebooting, restarting OctoPrint Server.
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)

Updating, please wait.
+++++++++++++++++++++++++++++++
Now updating OctoPrint to 1.3.8
+++++++++++++++++++++++++++++++
/home/pi/OctoPrint/venv/bin/python "/home/pi/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/softwareupdate/scripts/update-octoprint.py" --branch= --force=false "/home/pi/OctoPrint" 1.3.8
error: unknown object type 0 at offset 985421 in .git/objects/pack/pack-a631bb71b27aa186f0e3b8f0183248e8adf0c437.pack
error: failed to read object 45fd11f1d02f13914d7323084f9c8a12c00fb003 at offset 985421 from .git/objects/pack/pack-a631bb71b27aa186f0e3b8f0183248e8adf0c437.pack
fatal: packed object 45fd11f1d02f13914d7323084f9c8a12c00fb003 (stored in .git/objects/pack/pack-a631bb71b27aa186f0e3b8f0183248e8adf0c437.pack) is corrupt
fatal: index-pack failed
Traceback (most recent call last):
File "/home/pi/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/softwareupdate/scripts/update-octoprint.py", line 313, in
main()
File "/home/pi/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/softwareupdate/scripts/update-octoprint.py", line 309, in main
update_source(git_executable, folder, args.target, force=args.force, branch=args.branch)
File "/home/pi/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.3.5-py2.7.egg/octoprint/plugins/softwareupdate/scripts/update-octoprint.py", line 218, in update_source
raise RuntimeError("Could not update, "git fetch" failed with returncode {}".format(returncode))
RuntimeError: Could not update, "git fetch" failed with returncode 128
Python executable: '/home/pi/OctoPrint/venv/bin/python'

Running: git diff --shortstat
git diff --shortstat

Running: git fetch
git fetch
The update did not finish successfully. Please consult the log for details.

Hi, this also happened to me, 3 times. Could not solve it.

Here are some things to try.

Basically, it might be network issues or compression issues.

Considering this:

My money would be on the checkout having become corrupt. Reinstalling is probably easier than trying to repair that. Settings and data will persist.

Cause of corruption can be power loss in the wrong moment (never just pull power from a Pi, always power it down first) or file system corruption. Not much that OctoPrint can do about that, other than switching away from git based updates, which was done with 1.3.6 for this very reason.