Clicked on update Prompt Octoprint is broken now

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.

Thanks.
I'm going to reinstall anyway from scratch on new hardware.
But am super curious what gives here and want to learn from it.
Meanwhile If I want to print I simply re-install the old version and it works perfectly.

Steve

Any way to "clear this out"?
If it's still looking for the wrong files where is the location where it's configured to look for something so I can check it there or replace this configuration file?

This path makes me believe that you have manually installed octoprint outside of a virtualenv. The quick approach would be to just install from scratch using a virtualenv, as recommended by the raspbian install guide (raspbian is based on debian so the instructions are the same).

1 Like

Thanks,
Will check it out.