-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal FileNotFoundError error when using autoReload with a drive directly in the watch list #770
Comments
We had some issues with |
Hugely underutilized feature of Windows imo. Makes it much simpler to reproduce an environment on multiple computers, for example. Also great for cloud drive mapping (for example D: for DropBox, G: for Google Drive, O: for OneDrive etc.) |
I've tried to reproduce this locally but I wasn't able to do it with the given instructions. Can someone that can reproduce it provide the logs? (@john-aws some crucial element may be missing from the instructions to reproduce and I hope that the logs can provide more info on that) i.e.:
i.e.: working for me... |
Thanks for the follow-up. It looks like you are invoking the Python debugger in a different way to me. Specifically, you are choosing it from the launch dropdown at the top of the left-hand navigation pane. If I debug the code from there, it works fine. However, I'm not using that. I'm using a Run Python File/Debug Python File dropdown which appears top-right of the VS Code window, between the last open tab and the Actions icons, thus: I presume this menu is a feature of the VS Code debugpy debugger, but apologies if it's actually unrelated. The difference between what these two debug launch options do is as follows. Working:
Failing:
In the former, working case, a debug log is written to the extension sub-folder. In the latter, failing case (the subject of this issue), no debug log is written (and hence I have not attached one). I'm hoping the information provided above will suffice. |
Thanks for the additional info. The problem isn't really related to This can be reproduced with a launch with
As a note, everything should still work as usual in the debugger (even though it prints that error, that error is handled). |
I've just provided a fix for this. @john-aws if you can apply the fix locally and check if it works for you that'd be nice... To do that, you can run in debug a file which does:
Then open that file and do the change from https://github.com/microsoft/debugpy/pull/804/files at the |
Confirmed that this is working correctly with the patch, thanks. |
Environment data
python.languageServer
setting: Default[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (
python.languageServer: 'Microsoft'
), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]Expected behaviour
Clicking Debug Python File in Terminal would run my Python script cleanly.
Actual behaviour
Debugging works fine, but the Python Debug Console shows an internal FileNotFoundError error in the extension/pydev, per below. This specifically happens when I am working with Python source code on a subst'd drive (S: which is a subst of a local OneDrive folder). If, instead of opening folder S:, I open the real, underlying folder that is subst'd to S: (and that real folder is beneath C:\Users\xxxx\OneDrive\Documents\xyz) then everything works cleanly. The problem is only apparent when on the subst'd drive.
During handling of the above exception, another exception occurred:
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)The text was updated successfully, but these errors were encountered: