To diagnose file upload issue

What is the problem?

My octoprint suddenly stopped allowing me to upload gcode files. I press the upload button, locate the file, double click on the file (which closes the file dialogue window) but no file has appeared and no error message.

What did you already try to solve it?

rebooted and also rebooted in safe-mode. I've also tried to use the Octoprint plugin on Cura to try that way of uploading files, but when I press 'Print with Octoprint' in the Cura it returns Octoprint responded with an unknown error

Have you tried running in safe mode?

Yes

Did running in safe mode solve the problem?

No

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

bundle uploaded

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

OptoPrint version 1.10.3
OctoPi Version 1.0.0, running on Raspberry Pi 4 Model B Rev 1.5
Ender-3 S1 Pro
Firmware 2.0.8 28F1
Browser: Edge Version 131.0.2903.99
OS Windows 10 Pro
octoprint-systeminfo-20241214171909.zip (195.0 KB)

hmm....

2024-12-14 17:17:25,670 - octoprint - ERROR - Exception on /api/files/test [POST]
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.9/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/oprint/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/oprint/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/oprint/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/vendor/flask_principal.py", line 196, in _decorated
    rv = f(*args, **kw)
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/server/api/files.py", line 191, in runFilesTest
    sanitized_path, _, sanitized = sanitize(storage, path, filename)
  File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/server/api/files.py", line 178, in sanitize

could be SD card going bad maybe. possibly also no free space? what's shown in the file list for free space?

1 Like

Thank you. Where would I find the 'file list'

Under OctoPrint Settings and 'Folders' the disk space threholds are sett to warning = 500MB and critical=200MB. But I'm not getting any alerts that I know off.

Where you see the list of files on the left...

I don't really know where on OptoPrint to find the file list, but I have logged onto my raspberry pi and did a 'df'. and all looks ok to me.

image

What about this?

yeah, looks like it's not a space issue then based on df results.

No, this...on the main interface, not in settings, is what I was referring to.

But since this isn't an issue more likely a dying SD card possibly. You could try a force reinstall of OctoPrint just to make sure it's not a code issue. SSH to the pi and run this...

source ~/oprint/bin/activate
pip install --force-reinstall --no-cache-dir octoprint
deactivate
sudo service octoprint restart
1 Like

it threw up an error:

that's what happens when you type octoprint wrong. you put optoprint.

Well spotted, I'll get my coat :-0

The commands were accepted (apart deactivate), but sadly it made no difference, I still can't upload a file.

Are you able to create a full backup in OctoPrint's settings and download it?

ok, I've created a backup and downloaded it to my PC

Ok, was using that as a test to see if a file could be written to the SD card or not. If the zip file was created and you were able to download and verify it has stuff in it, then it might not be corruption. But now that you have the backup, I would try reflashing the SD card with OctoPi and then restore the backup during the initial setup wizard.

I'll have a try ...

I've re-flashed the drive and restored the backup and it's now all working. Many thanks for your help. Most appreciated!

1 Like