I see this is a problem, but the program still runs. Where is the problem?
I can’t solve this on my own even if I search it online. I need a pointer to where I can solve this problem.
I see this is a problem, but the program still runs. Where is the problem?
I can’t solve this on my own even if I search it online. I need a pointer to where I can solve this problem.
2
Answers
Those yellow lines means that the imported modules cannot be located.
This probably means that you downloaded the modules into a virtual environment and the modules are not installed globally. You are probably running the script with the correct virtual environment. Open your Command Palette with Ctrl + Shift + P and choose the correct Python interpreter.
For me, modules who have a yellow line under them are ones that your program doesn’t need. If I import a module that my program doesn’t need functions from, a yellow line will show under it.
To fix this issue, hover over the statement with the yellow line under it, then click on
Fix Issue
. A list will appear, with the first item probably beingRemove unused import statements
.If, however, the list item says something like
Select Python interpreter
, then this answer would fix your problem.