Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 16420

Cannot access member "getOrCreate" for type "classproperty"

$
0
0

I am using Pyspark inside VSCode using Pylance.

from pyspark.sql import SparkSessionspark = SparkSession.builder.getOrCreate()

I have this setting enabled:

"python.analysis.typeCheckingMode": "basic",

With this, I get this error:

Cannot access member "getOrCreate" for type "classproperty"Member "getOrCreate" is unknown Pylance (reportAttributeAccessIssue)

I haven't found any solution for this.

I read this issue: https://github.com/microsoft/pylance-release/issues/4577

But according to them, they blame pyspark, but I haven't found anyone in pyspark that is aware of this.


Viewing all articles
Browse latest Browse all 16420

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>