Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more

Reply
tmjones2
Helper I
Helper I

VS Code Integration with Fabric Notebooks Not Working

I'm running the code below and getting this error:

AttributeError: 'NoneType' object has no attribute 'sql'

df = spark.sql("SELECT * FROM MyLH.ClaimFacts LIMIT 1000")
display(df)
df.printSchema()

 

If i run java -version, I get:

 

My JAVA_HOME is set to jdk-8.0.412.8-hotspot

When I go to the bin folder in there and do java-version, it shows:
"openjdk version "1.8.0_412"

 

I have all the conda stuff installed

I have the condabin folder and the bin folder of the 1.8 java install in PATH

I'm using the synapse kernal in VSCode (the same as what it shows in the notebook in the Fabric workspace)

 

I'm reinstalled and restarted my machine 50 times

I've tried running as an admin

 

Any ideas?

3 REPLIES 3
Anonymous
Not applicable

Hi @tmjones2 
Thanks for using Fabric Community.
Please follow these steps:
1) Right click the ipython notebook

vnikhilanmsft_5-1716790693992.png

 



Reveal in File Explorer

2) Open the python log file: ../../../logs/${NOTEBOOK_ARTIFACT_ID}/PySparkLighter.log and check the session failure reason

vnikhilanmsft_4-1716790672765.png

Please attach the screenshot of the error here to understand what is happening.

You can also try stopping the spark session in the Notebook and try running in VS code. 
Thanks

Anonymous
Not applicable

Hi @tmjones2 
We haven’t heard from you on the last response and was just checking back to see if you could provide the details asked above.
Thanks

Anonymous
Not applicable

Hi @tmjones2 
We haven’t heard from you on the last response and was just checking back to see if you could provide the details asked above.
Thanks

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Fabric Update Carousel

Fabric Monthly Update - July 2026

Check out the July 2026 Fabric update to learn about new features.