<?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 I am getting NoneType error when running a query from API on cluster in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/i-am-getting-nonetype-error-when-running-a-query-from-api-on/m-p/66467#M33129</link>
    <description>&lt;P&gt;When I am running a query on Databricks itself from notebook, it is running fine and giving me results. But the same query when executed from FastAPI (Python, using databricks library) is giving me "TypeError: 'NoneType' object is not iterable".&lt;/P&gt;&lt;P&gt;I can see both queries (from notebook and from API) from SparkUI list of jobs and both of them are marked as SUCCESS.&lt;/P&gt;&lt;P&gt;Differences between two jobs:&amp;nbsp;&lt;BR /&gt;API one doesn't have any stdout logs (giving error "The requested Spark UI page does not exist."), whilst notebook one has logs.&lt;/P&gt;&lt;P&gt;API one has 3 stages in DAG visualization, whilst notebook one has 2 stages (additional stage is&amp;nbsp;&lt;SPAN&gt;mapPartitionsInternal)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;API is sending a query to "thriftsever-session-..." pool)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2024 14:01:15 GMT</pubDate>
    <dc:creator>Nastia</dc:creator>
    <dc:date>2024-04-17T14:01:15Z</dc:date>
    <item>
      <title>I am getting NoneType error when running a query from API on cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/i-am-getting-nonetype-error-when-running-a-query-from-api-on/m-p/66467#M33129</link>
      <description>&lt;P&gt;When I am running a query on Databricks itself from notebook, it is running fine and giving me results. But the same query when executed from FastAPI (Python, using databricks library) is giving me "TypeError: 'NoneType' object is not iterable".&lt;/P&gt;&lt;P&gt;I can see both queries (from notebook and from API) from SparkUI list of jobs and both of them are marked as SUCCESS.&lt;/P&gt;&lt;P&gt;Differences between two jobs:&amp;nbsp;&lt;BR /&gt;API one doesn't have any stdout logs (giving error "The requested Spark UI page does not exist."), whilst notebook one has logs.&lt;/P&gt;&lt;P&gt;API one has 3 stages in DAG visualization, whilst notebook one has 2 stages (additional stage is&amp;nbsp;&lt;SPAN&gt;mapPartitionsInternal)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;API is sending a query to "thriftsever-session-..." pool)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2024 14:01:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-am-getting-nonetype-error-when-running-a-query-from-api-on/m-p/66467#M33129</guid>
      <dc:creator>Nastia</dc:creator>
      <dc:date>2024-04-17T14:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: I am getting NoneType error when running a query from API on cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/i-am-getting-nonetype-error-when-running-a-query-from-api-on/m-p/104855#M41905</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/103694"&gt;@Nastia&lt;/a&gt;&amp;nbsp;, can you please share the entire stacktrace and the query that you are running.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is currently not much detail with which I can help you understand this. But it is totally possible it is a bug that's causing this, because there should be a uniform behavior on both API and notebook.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2025 07:20:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/i-am-getting-nonetype-error-when-running-a-query-from-api-on/m-p/104855#M41905</guid>
      <dc:creator>NandiniN</dc:creator>
      <dc:date>2025-01-09T07:20:38Z</dc:date>
    </item>
  </channel>
</rss>

