Files disappeared from octoprint file list

Problem:
My list of files in Octoprint suddenly became empty. Trying to upload files only results in the progress bar freezing at 100%.

I have logged in through SSH, navigated to the uploads folder and the files are present. I also tried changing uploads folder location through settings in octoprint, but no progress.

The setup is only a couple of days of, I had formatted and reinstalled the latest version of Octopi/Octoprint a few days ago.

Has anybody ever encountered this situation? Thank you!!
octoprint.log (205.2 KB)

Can you correlate the upload times with the log entries? I mean, when you upload a file, what does the log output say?

Given that you've changed the configuration and everything, I suspect maybe your path permissions are wrong. Here's what my upload folder permissions look like:

$ ls -ald ~/.octoprint/uploads/
drwxr-xr-x 2 pi pi 12288 Mar  6 16:28 /home/pi/.octoprint/uploads/

Also, the size and permissions of the metadata file and a couple of random files:

$ ls -al ~/.octoprint/uploads/
total 12544
-rw-------  1 pi pi 5014765 Mar  1 12:05 Cute_Cat_stencil_0.2mm_MK3MMU2.gcode
-rw-------  1 pi pi 3258060 Mar  6 16:27 laptop-test-strip-v1_0.2mm_MK3MMU2.gcode
-rw-r--r--  1 pi pi   62601 Mar  6 16:28 .metadata.json

Please share the above output from your Pi.

There are a couple errors in your logs that are unrelated, I think;

  • there's no unique_id for tracking in your config file. I think this is a bug that will be fixed in the next release, you can look around here for discussions of it.
  • lots of trouble with serial init, and I think that triggered a printTimeLeft error I've never noticed.

printTimeLeft failure

2019-03-06 07:12:44,102 - octoprint.printer.standard - ERROR - Error while trying to send initial state update
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/standard.py", line 919, in _sendInitialStateUpdate
    data = self._stateMonitor.get_current_data()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/standard.py", line 1356, in get_current_data
    self._progress = self._get_current_progress()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/standard.py", line 1282, in _get_current_progress
    return self._on_get_progress()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/standard.py", line 798, in _updateProgressDataCallback
    printTimeLeft=int(printTimeLeft) if printTimeLeft is not None else None,
OverflowError: cannot convert float infinity to integer

unique_id/tracking error

2019-03-06 07:14:04,014 - octoprint.plugin - ERROR - Error while calling plugin tracking
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/__init__.py", line 230, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking/__init__.py", line 119, in on_event
    self._track_printjob_event(event, payload)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking/__init__.py", line 237, in _track_printjob_event
    sha.update(self._settings.get([b"unique_id"]))
TypeError: update() argument 1 must be string or buffer, not None

It's probably worth visiting the Settings -> Anonymous Usage page and toggling things until you get a unique_id assigned.

Uploading a file at 18:25 (just realised PI has daylight savings so 17:25 in the log):
octoprint (1).log (237.0 KB)

pi@octopi:~ $  ls -al ~/.octoprint/uploads/
total 12
drwxr-xr-x  2 pi pi 4096 Mar  6 11:45 .
drwxr-xr-x 15 pi pi 4096 Mar  6 16:18 ..
-rw-r--r--  1 pi pi 1825 Mar  6 11:41 .metadata.json
pi@octopi:~ $  ls -al ~/.octoprint/uploads2
total 35376
drwxr-xr-x  2 pi pi     4096 Mar  6 17:25 .
drwxr-xr-x 15 pi pi     4096 Mar  6 16:18 ..
-rw-r--r--  1 pi pi     4483 Mar  6 17:25 .metadata.json
-rw-------  1 pi pi 16791716 Mar  6 11:49 PLA_Another_Hodor_fixed.gcode
-rw-------  1 pi pi  8407135 Mar  6 11:46 PLA_CatStand.gcode
-rw-------  1 pi pi  4418220 Mar  6 17:25 TT_abs_yamaha_xt660_dna2cover.gcode
-rw-------  1 pi pi  1476377 Mar  6 16:21 TT_northpoint_PLA.gcode
-rw-------  1 pi pi  3822702 Mar  6 13:51 TT_PLA_arduinomeage_din_mount.gcode
-rw-------  1 pi pi  1278626 Mar  6 11:49 TT_PLA_touch_sensor_fascia_00.gcode

Hmm, looks like the file you uploaded (the Yamaha 'dna2cover') is there, and Octoprint was starting to analyze it for the print time. Permissions are reasonable too. Do what Mr. Guru asked, which'll cut down on one error, at least.

2019-03-06 17:25:09,169 - octoprint.server.util.sockjs - INFO - User terence logged in on the socket from client ::ffff:192.168.1.100
2019-03-06 17:25:30,021 - octoprint.filemanager.analysis - INFO - Starting analysis of local:TT_abs_yamaha_xt660_dna2cover.gcode
2019-03-06 17:25:30,025 - octoprint.filemanager.analysis - INFO - Invoking analysis command: /home/pi/oprint/bin/python2 -m octoprint analysis gcode --speed-x=6000 --speed-y=6000 --max-t=10 --throttle=0.0 --throttle-lines=100 /home/pi/.octoprint/uploads2/TT_abs_yamaha_xt660_dna2cover.gcode

I was more of a DRZ person for that size of bike. My profile pic here is from a weeklong dirtbiking trip in the north part of Thailand.

Hehe nice! I've always been a Yammy person...also got a '76 DT175 :slight_smile:

I did what Mr. Guru said, got a unique id, but nothing changed as far as i can tell.

I have yet again changed my uploads folder to a new one and uploads are now 'seen' in the files list. I will try printing later on today and see how that goes.....

It's possible that the metadata file got corrupted.

If the metadata file is corrupt, can I delete it and will OctoPrint recreate it?

I think that's a question for @foosel :tentacle:

I know this does not answer the latest question, but following this, since I was the original poster back in 2019....My issue was just a matter of weak WIFI signal in the area where the PI was located. Fixed that, problem gone. Thank you all for the help :slight_smile:

2 Likes

Yes, but that will mean that all GCODE files in that folder will have to be re-analysed again, so just be aware that on the next server startup things will be really busy for a while.

2 Likes

Thanks! I was ready to do that but I tried going into safe mode and doing a refresh there. I also tried creating a new folder to test. It didn't create the folder so I got out of safe mode and interestingly my files were back. Complete with last print dates and print times. I guess the refresh in safe mode actually worked but didn't show until I restarted OctoPrint.

1 Like