0

Can someone let me know what the squiggly lines represent in the image? The actual error the flags up when I hover my mouse over the squiggly line is:

Import "pyspark.sql.functions" could not be resolvedPylance

I'm not sure what that means, but I'm getting the error for almost all functions in VSCode.

Can someone let me know how to resolve it? enter image description here

enter image description here

enter image description here

enter image description here

Patterson
  • 755
  • 2
  • 15
  • 1
    Did you select the right Python interpreter? – Klaus D. Dec 15 '21 at 11:12
  • some questions: - does your code actually run without import errors? - do you use virtualenv? - is vscode using the right python version? Do you use the right shebang? https://stackoverflow.com/questions/6908143/should-i-put-shebang-in-python-scripts-and-what-form-should-it-take – Josh Dec 15 '21 at 11:12
  • Klaus, Josh, I'm new to VSCode. Can you let me know how to determine the right Python interpreter? How to instsall right Python version? – Patterson Dec 15 '21 at 11:41
  • 1
    In the blue bottom bar somewhere on the left is the selected Python interpreter. If you have multiple installations you can select the right one there. Of cause you have to install the dependencies of your project for that interpreter version / virtual environment. – Klaus D. Dec 15 '21 at 12:12

0 Answers0