FileNotFoundError when opening or saving files in network drives
See original GitHub issueDescription
What steps will reproduce the problem?
I don’t know how to reproduce. I’d just opened a script and and clicked the Debug button Spyder’s toolbar. It took about 10 seconds to respond with this error.
Traceback
File "C:\Users\greg\Anaconda3\envs\nwra3\lib\ntpath.py", line 647, in realpath
path = _getfinalpathname(path)
FileNotFoundError: [WinError 53] The network path was not found: '\\\\kraken\\buildbot\\built_executables\\assemble_distributables.py'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\greg\Anaconda3\envs\nwra3\lib\site-packages\spyder\plugins\ipythonconsole\plugin.py", line 388, in <lambda>
self.main.editor.load(fname, lineno, word,
File "C:\Users\greg\Anaconda3\envs\nwra3\lib\site-packages\spyder\plugins\editor\plugin.py", line 2016, in load
current_editor = self.set_current_filename(filename,
File "C:\Users\greg\Anaconda3\envs\nwra3\lib\site-packages\spyder\plugins\editor\plugin.py", line 1552, in set_current_filename
return editorstack.set_current_filename(filename, focus)
File "C:\Users\greg\Anaconda3\envs\nwra3\lib\site-packages\spyder\plugins\editor\widgets\editor.py", line 1665, in set_current_filename
index = self.has_filename(filename)
File "C:\Users\greg\Anaconda3\envs\nwra3\lib\site-packages\spyder\plugins\editor\widgets\editor.py", line 1659, in has_filename
if fixpath(filename) == fixpath(finfo.filename):
File "C:\Users\greg\Anaconda3\envs\nwra3\lib\site-packages\spyder\plugins\editor\widgets\editor.py", line 1657, in <lambda>
fixpath = lambda path: osp.normcase(osp.realpath(path))
File "C:\Users\greg\Anaconda3\envs\nwra3\lib\ntpath.py", line 651, in realpath
path = _getfinalpathname_nonstrict(path)
File "C:\Users\greg\Anaconda3\envs\nwra3\lib\ntpath.py", line 601, in _getfinalpathname_nonstrict
path = _getfinalpathname(path)
FileNotFoundError: [WinError 53] The network path was not found: '\\\\kraken\\buildbot\\built_executables\\assemble_distributables.py'
Versions
- Spyder version: 4.1.5
- Python version: 3.8.5
- Qt version: 5.9.7
- PyQt5 version: 5.9.2
- Operating System: Windows 10
Dependencies
# Mandatory:
atomicwrites >=1.2.0 : 1.4.0 (OK)
chardet >=2.0.0 : 3.0.4 (OK)
cloudpickle >=0.5.0 : 1.6.0 (OK)
diff_match_patch >=20181111 : 20200713 (OK)
intervaltree : None (OK)
IPython >=4.0 : 7.19.0 (OK)
jedi =0.17.1 : 0.17.1 (OK)
nbconvert >=4.0 : 6.0.7 (OK)
numpydoc >=0.6.0 : 1.1.0 (OK)
paramiko >=2.4.0 : 2.7.2 (OK)
parso =0.7.0 : 0.7.0 (OK)
pexpect >=4.4.0 : 4.8.0 (OK)
pickleshare >=0.4 : 0.7.5 (OK)
psutil >=5.3 : 5.7.2 (OK)
pygments >=2.0 : 2.7.2 (OK)
pylint >=1.0 : 2.6.0 (OK)
pyls >=0.34.0;<1.0.0 : 0.35.1 (OK)
qdarkstyle >=2.8 : 2.8.1 (OK)
qtawesome >=0.5.7 : 1.0.1 (OK)
qtconsole >=4.6.0 : 4.7.7 (OK)
qtpy >=1.5.0 : 1.9.0 (OK)
rtree >=0.8.3 : 0.9.4 (OK)
sphinx >=0.6.6 : 3.2.1 (OK)
spyder_kernels >=1.9.4;<1.10.0 : 1.9.4 (OK)
watchdog : None (OK)
zmq >=17 : 19.0.2 (OK)
# Optional:
cython >=0.21 : 0.29.21 (OK)
matplotlib >=2.0.0 : 3.3.2 (OK)
numpy >=1.7 : 1.19.2 (OK)
pandas >=0.13.1 : 1.1.3 (OK)
scipy >=0.17.0 : 1.5.2 (OK)
sympy >=0.7.3 : 1.6.2 (OK)
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
FileNotFoundError: [Errno 2] - Possible work network issue?
To open and read a file specify the filename in your path: myfile = open("U:/matrix_neo/word ... The U: is a mapped drive in...
Read more >Python FileNotFoundError: [Errno 2] No such file or directory ...
This error tells you that you are trying to access a file or folder that does not exist. To fix this error, check...
Read more >Visio 2013 Opening .vsd file on Network Drive has File Not ...
I can try to open the file through open file in Visio, finding the file, and selecting open. Same File Not Found error....
Read more >How to Fix the "Network Path Was Not Found" Error on Windows
While you are at it, we also recommend checking if the device you want to share files with has the sharing feature enabled....
Read more >Mapped network drive not showing when opening or saving ...
Mapped network drive not showing when opening or saving file in PowerMill, PowerInspect. Products and versions covered.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry for the slow follow-up.
At @dalthviz 's suggestion, I was able to able to reproduce the problem in Spyder v. 4.1.5:
Following those same steps using Spyder v. 4.2.1, I confirm that everything works as expected. Steps 1 - 3 seem to behave the same in both 4.1.5 and 4.2.1, but in Step 4 (clicking to keep the file open) quietly leaves the file open, with no further error dialog, so no offer to send the traceback along with details.
Thank you for the suggestions and for the great software!
Hi Daniel,
I reported the issue o Github just now, I was out of town for a bit, hence the delay.
Thank you guys for your help! Miklos
Daniel Althviz Moré @.***> ezt írta (időpont: 2022. ápr. 15., P, 12:09):