skip to Main Content

I see this is a problem, but the program still runs. Where is the problem?

Screenshot.

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


  1. 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.

    Login or Signup to reply.
  2. 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 being Remove unused import statements.
    If, however, the list item says something like Select Python interpreter, then this answer would fix your problem.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search