OctoPrint / OctoPrint

OctoPrint is the snappy web interface for your 3D printer!

Home Page:https://octoprint.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uploading a file into a folder through "Upload to SD" causes an error

Yerusalmi opened this issue · comments

The problem

  1. Drag & drop a file into the "Upload to SD" section
  2. Wait for upload to end.
  3. You can see the file is successfully uploaded into the correct folder but there is an error bubble saying that the upload has failed.

Did the issue persist even in safe mode?

Yes, it did persist

If you could not test in safe mode, please state why ("currently printing" is NOT an excuse!)

No response

Version of OctoPrint

1.9.3

Operating system running OctoPrint

OctoPi* 1.0.0 (build 2023.10.09.151442)

Printer model & used firmware incl. version

Ender 3 S1

Browser and version of browser, operating system running browser

Chrome

Checklist of files to include below

  • Systeminfo Bundle (always include!)
  • Contents of the JavaScript browser console (always include in cases of issues with the user interface)
  • Screenshots and/or videos showing the problem (always include in case of issues with the user interface)
  • GCODE file with which to reproduce (always include in case of issues with GCODE analysis or printing behaviour)

Additional information & file uploads

octoprint-systeminfo-20240209112359.zip

2024-02-09 11:12:39,826 - octoprint.filemanager.analysis - INFO - Starting analysis of local:prints/Test 7_30m_0.24mm_194C_PLA_ENDER3S1.gcode 2024-02-09 11:12:39,837 - octoprint.filemanager.analysis - INFO - Invoking analysis command: /home/pi/oprint/bin/python -m octoprint analysis gcode --speed-x=6000 --speed-y=6000 --max-t=10 --throttle=0.0 --throttle-lines=100 --bed-z=0.0 /home/pi/.octoprint/uploads/prints/Test 7_30m_0.24mm_194C_PLA_ENDER3S1.gcode 2024-02-09 11:12:40,038 - octoprint - ERROR - Exception on /api/files/sdcard [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/server/util/flask.py", line 1613, in decorated_view return func(*args, **kwargs) 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 681, in uploadGcodeFile filename = fileProcessingFinished( File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/server/api/files.py", line 641, in fileProcessingFinished return filename, printer.add_sd_file( File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/printer/standard.py", line 984, in add_sd_file return self._add_sd_file(filename, path, tags=kwargs.get("tags")) File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/printer/standard.py", line 1009, in _add_sd_file remote_name = self._comm.startFileTransfer( File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/util/comm.py", line 1560, in startFileTransfer remote = "/" + self._get_free_remote_name(filename) File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/util/comm.py", line 1539, in _get_free_remote_name remote_name = get_dos_filename( File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/util/files.py", line 125, in get_dos_filename input = sanitize_filename(input, really_universal=True) File "/home/pi/oprint/lib/python3.9/site-packages/octoprint/util/files.py", line 60, in sanitize_filename raise ValueError("name must not contain / or \\") ValueError: name must not contain / or \ 2024-02-09 11:12:41,831 - octoprint.filemanager.analysis - INFO - Analysis of entry local:prints/Test 7_30m_0.24mm_194C_PLA_ENDER3S1.gcode finished, needed 2.01s

Hi @Yerusalmi!

It looks like you didn't upload a system info bundle as requested by the template. A bundle is required to further process your issue. It contains important logs and system information to be able to put your issue into context and give pointers as to what has happened.

Please edit your original post above and upload a bundle zip file. Actually upload the file please and do not paste some link to a cloud provider, we want to have everything in one place here. Also do not unpack, repack or otherwise modify the bundle or its name, share it exactly like you get it from OctoPrint.

Without the availability of a bundle, your issue will have to be closed.

Thank you for your collaboration.

Thank you @Yerusalmi for adding a bundle! Now this can actually get looked at.

Does the same thing happen when you upload the file to the root directory? My guess is there's an issue here with trying to sync it up from a subdirectory (prints in your case here). And tbh, I have no idea if opening files in sub directories on the SD card is even supported by firmware, and if so what happens if you try to do that for a directory that doesn't yet exist (there's no command to create a directory), so if it's indeed caused by the directory here, which I'm very sure of, that's something that will just have to get blocked for now.