Exception has occurred: ModuleNotFoundError
See original GitHub issuemaybe related to #12264
Environment data
- VS Code version: 1.45.1
- Extension version (available under the Extensions sidebar): 2020.5.2 (8 June 2020)
- OS and version: Window 10 Version 1909 (OS Build 18363.836)
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.7
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): virtualenv
Expected behaviour
I am using vscode debugger as usual. But since yesterday, me and my coworkers started getting Exception has occurred: ModuleNotFoundError
.
Actual behaviour
I started getting Exception has occurred: ModuleNotFoundError
since around yesterday noon. I notice that that time coincide new version release time. https://github.com/microsoft/vscode-python/releases/tag/2020.5.86398
Steps to reproduce:
I extracted simple code to reproduce. Simple try
except
import
can be used to reproduce error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
How to fix ModuleNotFoundError in python with Visual Studio ...
When understanding this, you should be able to resolve your exception: Exception has occurred: ModuleNotFoundError No module named 'clases'.
Read more >ModuleNotFoundError: no module named Python Error [Fixed]
How to fix the ModuleNotFoundError in Python · 1. Make sure imported modules are installed · 2. Make sure modules are spelled correctly...
Read more >Exception has occurred: ModuleNotFoundError No module ...
Hello, I've looked for duplicate issues and it appears this comes up frequently but in 9/10 cases, the issue is accidentally running python2 ......
Read more >Python ModuleNotFoundError Solution - Career Karma
The ModuleNotFoundError is raised when Python cannot locate an error. The most common cause of this error is forgetting to install a module...
Read more >Built-in Exceptions — Python 3.11.1 documentation
Raised when a Unicode-related encoding or decoding error occurs. It is a subclass of ValueError . UnicodeError has attributes that describe the encoding...
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
This is microsoft/debugpy#281
The bug is that the exception is reported incorrectly when it shouldn’t be, but it doesn’t actually break your app - if you press F5, it should continue running. To prevent it from being reported, uncheck “User-Unhandled Exceptions” in the Breakpoints pane in bottom left.
(You shouldn’t need to uncheck “Unhandled Exceptions”.)
Same here… If you install the previous version:
ms-python.python@2020.5.80290
it’s work. But is not the best way to solve it.