You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running on Windows 7, I set my Octoprint upload folder to a folder where I also save and edit gcode. I had a gcode file in this directory open in my text editor, but was trying to refresh Octoprint to get it to show a different file. Because the file I had open in the editor was locked (and had not yet been scanned by Octoprint), Octoprint was getting permission denied. Apparently, it stopped scanning at that point. It did not find/scan the other gcode file I had saved there, which was not open/locked.
This should be reproducible by saving a new file in the upload folder but keeping that file open with an exclusive lock. Then copy/save another file in the folder and release that file's lock. Octoprint will fail to scan the second file. The second file may need to come after the first in scanning order (which I guess is lexigraphical).
What did you expect to happen?
Octoprint should skip the problematic file and continue scanning other files.
What happened instead?
2017-12-16 14:37:34,500 - octoprint - ERROR - Exception on /api/files [GET]
Traceback (most recent call last):
File "c:\OctoPrint\venv\lib\site-packages\flask-0.10.1-py2.7.egg\flask\app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "c:\OctoPrint\venv\lib\site-packages\flask-0.10.1-py2.7.egg\flask\app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "c:\OctoPrint\venv\lib\site-packages\flask-0.10.1-py2.7.egg\flask\app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "c:\OctoPrint\venv\lib\site-packages\flask-0.10.1-py2.7.egg\flask\app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "c:\OctoPrint\venv\lib\site-packages\flask-0.10.1-py2.7.egg\flask\app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "c:\OctoPrint\venv\lib\site-packages\octoprint-1.3.6-py2.7.egg\octoprint\server\util\flask.py", line 964, in decorated_function
response = f(*args, **kwargs)
File "c:\OctoPrint\venv\lib\site-packages\octoprint-1.3.6-py2.7.egg\octoprint\server\api\files.py", line 102, in readGcodeFiles
files = _getFileList(FileDestinations.LOCAL, filter=filter, recursive=recursive, allow_from_cache=not force)
File "c:\OctoPrint\venv\lib\site-packages\octoprint-1.3.6-py2.7.egg\octoprint\server\api\files.py", line 174, in _getFileList
files = fileManager.list_files(origin, path=path, filter=filter_func, recursive=recursive)[origin].values()
File "c:\OctoPrint\venv\lib\site-packages\octoprint-1.3.6-py2.7.egg\octoprint\filemanager\__init__.py", line 455, in list_files
result[dst] = self._storage_managers[dst].list_files(path=path, filter=filter, recursive=recursive)
File "c:\OctoPrint\venv\lib\site-packages\octoprint-1.3.6-py2.7.egg\octoprint\filemanager\storage.py", line 603, in list_files
return self._list_folder(path, base=base, entry_filter=filter, recursive=recursive)
File "c:\OctoPrint\venv\lib\site-packages\octoprint-1.3.6-py2.7.egg\octoprint\filemanager\storage.py", line 1338, in _list_folder
metadata=metadata)
File "c:\OctoPrint\venv\lib\site-packages\octoprint-1.3.6-py2.7.egg\octoprint\filemanager\storage.py", line 1424, in _add_basic_metadata
hash=self._create_hash(os.path.join(path, entry)),
File "c:\OctoPrint\venv\lib\site-packages\octoprint-1.3.6-py2.7.egg\octoprint\filemanager\storage.py", line 1454, in _create_hash
with open(path, "rb") as f:
IOError: [Errno 13] Permission denied: u'D:\\Downloads\\Things\\WTTSP_medium_res_continued.gcode'
Did the same happen when running OctoPrint in safe mode?
I didn't try.
Version of OctoPrint
1.3.6
Operating System running OctoPrint
Windows 7 64-bit
Printer model & used firmware incl. version
Flsun i3c, Marlin 1.1.6
Browser and Version of Browser, Operating System running Browser
What were you doing?
Running on Windows 7, I set my Octoprint upload folder to a folder where I also save and edit gcode. I had a gcode file in this directory open in my text editor, but was trying to refresh Octoprint to get it to show a different file. Because the file I had open in the editor was locked (and had not yet been scanned by Octoprint), Octoprint was getting permission denied. Apparently, it stopped scanning at that point. It did not find/scan the other gcode file I had saved there, which was not open/locked.
This should be reproducible by saving a new file in the upload folder but keeping that file open with an exclusive lock. Then copy/save another file in the folder and release that file's lock. Octoprint will fail to scan the second file. The second file may need to come after the first in scanning order (which I guess is lexigraphical).
What did you expect to happen?
Octoprint should skip the problematic file and continue scanning other files.
What happened instead?
Did the same happen when running OctoPrint in safe mode?
I didn't try.
Version of OctoPrint
1.3.6
Operating System running OctoPrint
Windows 7 64-bit
Printer model & used firmware incl. version
Flsun i3c, Marlin 1.1.6
Browser and Version of Browser, Operating System running Browser
Chrome 63
Link to octoprint.log
https://gist.github.com/chambm/eadb3b64c0635c5d3b6a5b6b3904b661
Link to contents of terminal tab or serial.log
n/a
Link to contents of Javascript console in the browser
n/a
I have read the FAQ.
The text was updated successfully, but these errors were encountered: