<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VS Code notebook Spark failure in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3679203#M1500</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/451446"&gt;@BiJoe&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;We haven’t heard from you on the last response and was just checking back to see if you provide the details asked above. Please let us know if you have any further queries.&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 05 Feb 2024 05:32:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-05T05:32:50Z</dc:date>
    <item>
      <title>VS Code notebook Spark failure</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3672368#M1496</link>
      <description>&lt;P&gt;In my workspace I have two notebooks, where one is actively edited in VS Code Synapse extension, and mostly works. The only hickup is that all Spark methods are called out with &lt;EM&gt;"spark is not defined" Pylance&amp;nbsp;&lt;/EM&gt;message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The other notebook is newly created and tested OK with some basic Pyspark commands in Fabric online. However, when I try to run a cell in VS Code, for example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;spark.conf.set("spark.sql.parquet.vorder.enabled", "true")
spark.conf.set("spark.microsoft.delta.optimizeWrite.enabled", "true")
spark.conf.set("spark.microsoft.delta.optimizeWrite.binSize", "1073741824")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[1], line 1
----&amp;gt; 1 spark.conf.set("spark.sql.parquet.vorder.enabled", "true")
      2 spark.conf.set("spark.microsoft.delta.optimizeWrite.enabled", "true")
      3 spark.conf.set("spark.microsoft.delta.optimizeWrite.binSize", "1073741824")

AttributeError: 'NoneType' object has no attribute 'conf'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;For both notebooks, the Fabric Synapse runtimes load seemingly correctly, and I've tried both 1.1 and 1.2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;base                     C:\ProgramData\anaconda3
fabric-synapse-runtime-1-1     C:\ProgramData\anaconda3\envs\fabric-synapse-runtime-1-1
fabric-synapse-runtime-1-2     C:\ProgramData\anaconda3\envs\fabric-synapse-runtime-1-2


Check if synapse spark kernel env has created... true
The synapse spark 3.4 kernel env has been created, skip the creation process of conda env.
The lighter Lib already exists and the version meets requirement, skip download.
Initialization of synapse spark 3.4 kernel env has finished.
-----------------------------------------------------------
The Synapse PySpark environment preparation is complete! Now, please switch your kernel to start exploring and working with it!
===========================================================&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Screenshot of how the two notebooks are showing in my VS Code, note two different icons:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VS Code notebook symbols.png" style="width: 401px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1035457iBA39C9047BB048C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="VS Code notebook symbols.png" alt="VS Code notebook symbols.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any clues to what might cause this problem?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 09:33:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3672368#M1496</guid>
      <dc:creator>BiJoe</dc:creator>
      <dc:date>2024-02-01T09:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: VS Code notebook Spark failure</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3674582#M1497</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/451446"&gt;@BiJoe&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for using Fabric Community.&lt;BR /&gt;Apologies for the issue you have been facing.&amp;nbsp;May I know which kernel are you using when this issue occured?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 04:17:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3674582#M1497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-02T04:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: VS Code notebook Spark failure</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3674984#M1498</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I have Synapse Spark kernel 3.4 installed, and have tried both runtimes 1.1 and 1.2&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 08:07:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3674984#M1498</guid>
      <dc:creator>BiJoe</dc:creator>
      <dc:date>2024-02-02T08:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: VS Code notebook Spark failure</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3675480#M1499</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/451446"&gt;@BiJoe&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Can you please provide the log for this error? Just copy paste the error log here.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2024 11:51:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3675480#M1499</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-02T11:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: VS Code notebook Spark failure</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3679203#M1500</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/451446"&gt;@BiJoe&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;We haven’t heard from you on the last response and was just checking back to see if you provide the details asked above. Please let us know if you have any further queries.&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 05:32:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3679203#M1500</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-05T05:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: VS Code notebook Spark failure</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3680403#M1501</link>
      <description>&lt;P&gt;I completely uninstalled VS Code, and reinstalled extensions. Now the notebook works as it should&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 13:48:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3680403#M1501</guid>
      <dc:creator>BiJoe</dc:creator>
      <dc:date>2024-02-05T13:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: VS Code notebook Spark failure</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3955278#M2258</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/451446"&gt;@BiJoe&lt;/a&gt;&amp;nbsp;, I am also facing the same issue as yours, when i try to run my fabric code through VS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My kernel is -&amp;gt; fabric-synapse-runtime-1-2&amp;nbsp;&lt;/P&gt;&lt;P&gt;And when i run any spark related commands, im getting the same error -&amp;gt; AttributeError: 'NoneType' object has no attribute 'sql'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to run any basic print statements, but not anything related to 'spark'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per your solution, I tried to uninstall VS Code and reinstall the extensions but unfortunately it didnt work and I am stuck at the same place.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any kind of help/solution would be really appreciated.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 13:26:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3955278#M2258</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-28T13:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: VS Code notebook Spark failure</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3957103#M2283</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;hi, sorry I abandoned using the Spark notebooks a while ago, so I don't know if this issue is resolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 08:02:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3957103#M2283</guid>
      <dc:creator>BiJoe</dc:creator>
      <dc:date>2024-05-29T08:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: VS Code notebook Spark failure</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3957140#M2285</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/451446"&gt;@BiJoe&lt;/a&gt;&amp;nbsp;No problem, thanks for the reply!&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 08:18:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/VS-Code-notebook-Spark-failure/m-p/3957140#M2285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-29T08:18:15Z</dc:date>
    </item>
  </channel>
</rss>

