Clicked on update Prompt Octoprint is broken now

When I logged into Octoprint yesterday I was prompted that an update was available and apparently
made the mistake of clicking on it.

All looked well and it said "Update completed successfully!" and prompted me to restart Octoprint.
It does not work now. Can no longer log in.

I am brand new to Octoprint and am not very familiar with Python.

I muddled through installing this on a Debian PC about 1 month ago and it has been working flawlessly
until I followed the update popup yesterday.
I am not sure what version of Octoprint this is or where to look for that as the web UI no longer works.
All I see is " Connecting to OctoPrint's server..."

On startup I can see this:

2020-12-18 12:44:15,855 - octoprint.startup - INFO - Starting OctoPrint 1.5.2
2020-12-18 12:44:15,855 - octoprint.startup - INFO - ************************

So I am guessing that's the version it just updated to.

Repeat: This is installed on a Debian Linux box (PC) and not a Raspberry Pi.

There are some obvious startup errors (lots and lots of them) and seem to indicate at least a bunch of
missing files.

Any idea what I might have done wrong or didn't do right?
Or better yet how do I recover it without reinstalling from scratch?
The update should have just worked right?
There were no errors when it updated and it said update completed successfully when it was done.

Thanks!!

IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/octoprint/static/js/lib/hls.js'
2020-12-18 12:28:07,551 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "/home/steve/.local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 265, in fixed_wrap_cache
    content = func().getvalue()
  File "/usr/local/lib/python2.7/dist-packages/webassets/merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "/usr/local/lib/python2.7/dist-packages/webassets/merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/octoprint/static/js/app/viewmodels/loginui.js'
2020-12-18 12:28:07,579 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "/home/steve/.local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 265, in fixed_wrap_cache
    content = func().getvalue()
  File "/usr/local/lib/python2.7/dist-packages/webassets/merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "/usr/local/lib/python2.7/dist-packages/webassets/merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/octoprint/static/js/app/viewmodels/loginui.js'
2020-12-18 12:42:32,539 - octoprint.server.heartbeat - INFO - Server heartbeat <3

Did you follow a guide to set it up?
If yes which one did you use?

there is a command which you can use to reinstall octoprint but it depends on whether you used a venv and which folder you used

it could look like this

~/OctoPrint/venv/bin/pip install --force-reinstall OctoPrint==1.5.2 --no-cache-dir

Yeah, that just looks like some files went missing in the update, might want to add --no-cache-dir to that command PrintedWeezl mentioned to make sure it was not a bad download too.

1 Like

For the moment this fixed it.
pip install --force-reinstall OctoPrint==1.4.2
I'll try the update and what you have suggested above as well.

I at first thinking maybe I needed to update Python separately but I already have the newer
Python as well as 2.7 installed.
The startup errors appear to be looking for 2.7 related resources.

I don't remember really any details on what I did when I set it up.
Was a temporary test that I didn't expect to keep around this long.
I don't remember anything about venv so probably didn't follow that guide.
I followed some kind of guide because I got it installed and working in about 20 minutes.
I'm a linux admin to some degree so I can usually make things work even when I have about no clue about them :slight_smile:

Tried the update from the interface (again) broken again.
Also tried:
pip install --force-reinstall OctoPrint==1.5.2 --no-cache-dir
As suggested above.
It did a BUNCH of stuff and completed without errors.
Octoprint is still very broken and gets the same exact errors ad detailed below.

File "/home/steve/.local/lib/python2.7/site-packages/webassets/merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/octoprint/static/vendor/font-awesome-5.15.1/css/v4-shims.min.css'
2020-12-19 16:35:40,561 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "/home/steve/.local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 265, in fixed_wrap_cache
    content = func().getvalue()
  File "/home/steve/.local/lib/python2.7/site-packages/webassets/merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "/home/steve/.local/lib/python2.7/site-packages/webassets/merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/octoprint/static/js/lib/jquery/jquery-ui.js'
2020-12-19 16:35:40,572 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "/home/steve/.local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 265, in fixed_wrap_cache
    content = func().getvalue()
  File "/home/steve/.local/lib/python2.7/site-packages/webassets/merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "/home/steve/.local/lib/python2.7/site-packages/webassets/merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/octoprint/static/js/lib/hls.js'
2020-12-19 16:35:40,593 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "/home/steve/.local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 265, in fixed_wrap_cache
    content = func().getvalue()
  File "/home/steve/.local/lib/python2.7/site-packages/webassets/merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "/home/steve/.local/lib/python2.7/site-packages/webassets/merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/octoprint/static/js/app/viewmodels/loginui.js'
2020-12-19 16:35:40,621 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):
  File "/home/steve/.local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 265, in fixed_wrap_cache
    content = func().getvalue()
  File "/home/steve/.local/lib/python2.7/site-packages/webassets/merge.py", line 250, in func
    data = StringIO(hunk.data())
  File "/home/steve/.local/lib/python2.7/site-packages/webassets/merge.py", line 78, in data
    f = open(self.filename, 'r', encoding='utf-8')
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/octoprint/static/js/app/viewmodels/loginui.js'
2020-12-19 16:35:40,643 - octoprint.server.preemptive_cache - INFO - ... done in 0.22s

And just as before: pip install --force-reinstall OctoPrint==1.4.2
Puts it back and all works again on the older version.

Have you tried --no-cache-dir?
I wonder if you have a bad download of 1.5.2 - those files are definitely there. --no-cache-dir eliminates pip's local cache.

pip install --force-reinstall --no-cache-dir OctoPrint==1.5.2

Those files definitely should exist, they exist in the source, the only thing I can think of is some corruption, either in the SD card or install process.

Yes . .... .

It's not an SD card it is a SATA SSD and it not appear to be any kind of corruption.

I will try gain as root

Nope- installing as root makes absolutely no difference same errors.

Install always seems to go perfectly without any errors.

When starting octoprint it reports many files not found.

I'm seeing an issue where what it is calling for and what actually exists are different.

IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/octoprint/static/vendor/font-awesome-4.7.0/css/font-awesome.min.css'
2020-12-19 18:40:30,772 - octoprint.server.util.flask.fix_webassets_filtertool - ERROR - Got an exception while trying to apply filter, ignoring file
Traceback (most recent call last):

root@Octo:/usr/local/lib/python2.7/dist-packages/octoprint/static/vendor# ls -l
total 8
drwxr-sr-x 4 root staff 4096 Dec 19 18:28 font-awesome-3.2.1
drwxr-sr-x 4 root staff 4096 Dec 19 18:28 font-awesome-5.15.1
root@Octo:/usr/local/lib/python2.7/dist-packages/octoprint/static/vendor#

Yeah, it's acting like it's trying to load previous version. If you open your browser in icognito mode and go to the octoprint address does it load then?

Has nothing to do with the browser.
Not sure why you are asking that.
You can see the missing file errors at the command prompt when you try to start Octoprint.
Thanks.

I was asking that because the front end could have been requesting the old assets potentially in the case of a cached wed page.

Yep I'm a bit clueless here (sorry).
Guess I'm not familiar with it enough to think it even possible that the front end would request
anything different based on if a remote browser/client is running in some mode or another.
Also not sure what you mean by "front end"
Does octoprint have a front end and back end within itself?

No ideas on what's going on here?
Why a reinstall doesn't fix or add the missing files in
/usr/local/lib/python2.7/dist-packages/octoprint/static/vendor/font-awesome-4.7.0/ ???

I clearly only have:

root@Octo:/usr/local/lib/python2.7/dist-packages/octoprint/static/vendor# ls -l
total 8
drwxr-sr-x 4 root staff 4096 Dec 19 18:28 font-awesome-3.2.1
drwxr-sr-x 4 root staff 4096 Dec 19 18:28 font-awesome-5.15.1
root@Octo:/usr/local/lib/python2.7/dist-packages/octoprint/static/vendor#

I did not use any kind of "venv" when I installed.
I do not even know what that is without googling it.

I'm guessing it's some kind of "virtual environment for python to run in with it's own paths and such.
No I didn't do that,
Should it not work fine without it?
And why does reinstalling 1.4.2 work just fine but the latest does not?

What/which tutorial should I be following to install?
Back when I installed it I just used one that I found on how to install in on Debian.
And it worked.

To be honest, I have no idea why it is still looking for those files since they aren't there and are not supposed to be there. Something's left over from the previous version that shouldn't be.

Those are the instructions for installing on Raspbian/Raspberry Pi OS but since that is based on Debian they'll be the same.