blob: 70f3c268723bd30eddf87d269bbc3d53f1330df2 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>pyspark.errors.exceptions.base &#8212; PySpark 3.5.3 documentation</title>
<link href="../../../../_static/styles/theme.css?digest=1999514e3f237ded88cf" rel="stylesheet">
<link href="../../../../_static/styles/pydata-sphinx-theme.css?digest=1999514e3f237ded88cf" rel="stylesheet">
<link rel="stylesheet"
href="../../../../_static/vendor/fontawesome/5.13.0/css/all.min.css">
<link rel="preload" as="font" type="font/woff2" crossorigin
href="../../../../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2">
<link rel="preload" as="font" type="font/woff2" crossorigin
href="../../../../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2">
<link rel="stylesheet" href="../../../../_static/styles/pydata-sphinx-theme.css" type="text/css" />
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../../../_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="../../../../_static/css/pyspark.css" />
<link rel="preload" as="script" href="../../../../_static/scripts/pydata-sphinx-theme.js?digest=1999514e3f237ded88cf">
<script id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
<script src="../../../../_static/jquery.js"></script>
<script src="../../../../_static/underscore.js"></script>
<script src="../../../../_static/doctools.js"></script>
<script src="../../../../_static/language_data.js"></script>
<script src="../../../../_static/clipboard.min.js"></script>
<script src="../../../../_static/copybutton.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
<link rel="canonical" href="https://spark.apache.org/docs/latest/api/python/_modules/pyspark/errors/exceptions/base.html" />
<link rel="search" title="Search" href="../../../../search.html" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="docsearch:language" content="None">
<!-- Google Analytics -->
</head>
<body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80">
<div class="container-fluid" id="banner"></div>
<nav class="navbar navbar-light navbar-expand-lg bg-light fixed-top bd-navbar" id="navbar-main"><div class="container-xl">
<div id="navbar-start">
<a class="navbar-brand" href="../../../../index.html">
<img src="../../../../_static/spark-logo-reverse.png" class="logo" alt="logo">
</a>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-collapsible" aria-controls="navbar-collapsible" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar-collapsible" class="col-lg-9 collapse navbar-collapse">
<div id="navbar-center" class="mr-auto">
<div class="navbar-center-item">
<ul id="navbar-main-elements" class="navbar-nav">
<li class="toctree-l1 nav-item">
<a class="reference internal nav-link" href="../../../../index.html">
Overview
</a>
</li>
<li class="toctree-l1 nav-item">
<a class="reference internal nav-link" href="../../../../getting_started/index.html">
Getting Started
</a>
</li>
<li class="toctree-l1 nav-item">
<a class="reference internal nav-link" href="../../../../user_guide/index.html">
User Guides
</a>
</li>
<li class="toctree-l1 nav-item">
<a class="reference internal nav-link" href="../../../../reference/index.html">
API Reference
</a>
</li>
<li class="toctree-l1 nav-item">
<a class="reference internal nav-link" href="../../../../development/index.html">
Development
</a>
</li>
<li class="toctree-l1 nav-item">
<a class="reference internal nav-link" href="../../../../migration_guide/index.html">
Migration Guides
</a>
</li>
</ul>
</div>
</div>
<div id="navbar-end">
<div class="navbar-end-item">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div id="version-button" class="dropdown">
<button type="button" class="btn btn-secondary btn-sm navbar-btn dropdown-toggle" id="version_switcher_button" data-toggle="dropdown">
3.5.3
<span class="caret"></span>
</button>
<div id="version_switcher" class="dropdown-menu list-group-flush py-0" aria-labelledby="version_switcher_button">
<!-- dropdown will be populated by javascript on page load -->
</div>
</div>
<script type="text/javascript">
// Function to construct the target URL from the JSON components
function buildURL(entry) {
var template = "https://spark.apache.org/docs/{version}/api/python/index.html"; // supplied by jinja
template = template.replace("{version}", entry.version);
return template;
}
// Function to check if corresponding page path exists in other version of docs
// and, if so, go there instead of the homepage of the other docs version
function checkPageExistsAndRedirect(event) {
const currentFilePath = "_modules/pyspark/errors/exceptions/base.html",
otherDocsHomepage = event.target.getAttribute("href");
let tryUrl = `${otherDocsHomepage}${currentFilePath}`;
$.ajax({
type: 'HEAD',
url: tryUrl,
// if the page exists, go there
success: function() {
location.href = tryUrl;
}
}).fail(function() {
location.href = otherDocsHomepage;
});
return false;
}
// Function to populate the version switcher
(function () {
// get JSON config
$.getJSON("https://spark.apache.org/static/versions.json", function(data, textStatus, jqXHR) {
// create the nodes first (before AJAX calls) to ensure the order is
// correct (for now, links will go to doc version homepage)
$.each(data, function(index, entry) {
// if no custom name specified (e.g., "latest"), use version string
if (!("name" in entry)) {
entry.name = entry.version;
}
// construct the appropriate URL, and add it to the dropdown
entry.url = buildURL(entry);
const node = document.createElement("a");
node.setAttribute("class", "list-group-item list-group-item-action py-1");
node.setAttribute("href", `${entry.url}`);
node.textContent = `${entry.name}`;
node.onclick = checkPageExistsAndRedirect;
$("#version_switcher").append(node);
});
});
})();
</script>
</div>
</div>
</div>
</div>
</nav>
<div class="container-xl">
<div class="row">
<!-- Only show if we have sidebars configured, else just a small margin -->
<div class="col-12 col-md-3 bd-sidebar">
<div class="sidebar-start-items"><form class="bd-search d-flex align-items-center" action="../../../../search.html" method="get">
<i class="icon fas fa-search"></i>
<input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" >
</form><nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
<div class="bd-toc-item active">
</div>
</nav>
</div>
<div class="sidebar-end-items">
</div>
</div>
<div class="d-none d-xl-block col-xl-2 bd-toc">
</div>
<main class="col-12 col-md-9 col-xl-7 py-md-5 pl-md-5 pr-md-4 bd-content" role="main">
<div>
<h1>Source code for pyspark.errors.exceptions.base</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># Licensed to the Apache Software Foundation (ASF) under one or more</span>
<span class="c1"># contributor license agreements. See the NOTICE file distributed with</span>
<span class="c1"># this work for additional information regarding copyright ownership.</span>
<span class="c1"># The ASF licenses this file to You under the Apache License, Version 2.0</span>
<span class="c1"># (the &quot;License&quot;); you may not use this file except in compliance with</span>
<span class="c1"># the License. You may obtain a copy of the License at</span>
<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing, software</span>
<span class="c1"># distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span>
<span class="c1"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
<span class="c1"># See the License for the specific language governing permissions and</span>
<span class="c1"># limitations under the License.</span>
<span class="c1">#</span>
<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">cast</span>
<span class="kn">from</span> <span class="nn">pyspark.errors.utils</span> <span class="kn">import</span> <span class="n">ErrorClassesReader</span>
<div class="viewcode-block" id="PySparkException"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.PySparkException.html#pyspark.errors.PySparkException">[docs]</a><span class="k">class</span> <span class="nc">PySparkException</span><span class="p">(</span><span class="ne">Exception</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Base Exception for handling errors generated from PySpark.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">message</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">error_class</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">message_parameters</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="p">):</span>
<span class="c1"># `message` vs `error_class` &amp; `message_parameters` are mutually exclusive.</span>
<span class="k">assert</span> <span class="p">(</span><span class="n">message</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="p">(</span><span class="n">error_class</span> <span class="ow">is</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">message_parameters</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">))</span> <span class="ow">or</span> <span class="p">(</span>
<span class="n">message</span> <span class="ow">is</span> <span class="kc">None</span> <span class="ow">and</span> <span class="p">(</span><span class="n">error_class</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">message_parameters</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">)</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">error_reader</span> <span class="o">=</span> <span class="n">ErrorClassesReader</span><span class="p">()</span>
<span class="k">if</span> <span class="n">message</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">message</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">error_reader</span><span class="o">.</span><span class="n">get_error_message</span><span class="p">(</span>
<span class="n">cast</span><span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="n">error_class</span><span class="p">),</span> <span class="n">cast</span><span class="p">(</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">],</span> <span class="n">message_parameters</span><span class="p">)</span>
<span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">message</span> <span class="o">=</span> <span class="n">message</span>
<span class="bp">self</span><span class="o">.</span><span class="n">error_class</span> <span class="o">=</span> <span class="n">error_class</span>
<span class="bp">self</span><span class="o">.</span><span class="n">message_parameters</span> <span class="o">=</span> <span class="n">message_parameters</span>
<div class="viewcode-block" id="PySparkException.getErrorClass"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.PySparkException.getErrorClass.html#pyspark.errors.PySparkException.getErrorClass">[docs]</a> <span class="k">def</span> <span class="nf">getErrorClass</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns an error class as a string.</span>
<span class="sd"> .. versionadded:: 3.4.0</span>
<span class="sd"> See Also</span>
<span class="sd"> --------</span>
<span class="sd"> :meth:`PySparkException.getMessageParameters`</span>
<span class="sd"> :meth:`PySparkException.getSqlState`</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">error_class</span></div>
<div class="viewcode-block" id="PySparkException.getMessageParameters"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.PySparkException.getMessageParameters.html#pyspark.errors.PySparkException.getMessageParameters">[docs]</a> <span class="k">def</span> <span class="nf">getMessageParameters</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns a message parameters as a dictionary.</span>
<span class="sd"> .. versionadded:: 3.4.0</span>
<span class="sd"> See Also</span>
<span class="sd"> --------</span>
<span class="sd"> :meth:`PySparkException.getErrorClass`</span>
<span class="sd"> :meth:`PySparkException.getSqlState`</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">message_parameters</span></div>
<div class="viewcode-block" id="PySparkException.getSqlState"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.PySparkException.getSqlState.html#pyspark.errors.PySparkException.getSqlState">[docs]</a> <span class="k">def</span> <span class="nf">getSqlState</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns an SQLSTATE as a string.</span>
<span class="sd"> Errors generated in Python have no SQLSTATE, so it always returns None.</span>
<span class="sd"> .. versionadded:: 3.4.0</span>
<span class="sd"> See Also</span>
<span class="sd"> --------</span>
<span class="sd"> :meth:`PySparkException.getErrorClass`</span>
<span class="sd"> :meth:`PySparkException.getMessageParameters`</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="kc">None</span></div>
<span class="k">def</span> <span class="fm">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">str</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">getErrorClass</span><span class="p">()</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="sa">f</span><span class="s2">&quot;[</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">getErrorClass</span><span class="p">()</span><span class="si">}</span><span class="s2">] </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">message</span></div>
<div class="viewcode-block" id="AnalysisException"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.AnalysisException.html#pyspark.errors.AnalysisException">[docs]</a><span class="k">class</span> <span class="nc">AnalysisException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Failed to analyze a SQL query plan.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<span class="k">class</span> <span class="nc">SessionNotSameException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Performed the same operation on different SparkSession.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<div class="viewcode-block" id="TempTableAlreadyExistsException"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.TempTableAlreadyExistsException.html#pyspark.errors.TempTableAlreadyExistsException">[docs]</a><span class="k">class</span> <span class="nc">TempTableAlreadyExistsException</span><span class="p">(</span><span class="n">AnalysisException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Failed to create temp view since it is already exists.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<div class="viewcode-block" id="ParseException"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.ParseException.html#pyspark.errors.ParseException">[docs]</a><span class="k">class</span> <span class="nc">ParseException</span><span class="p">(</span><span class="n">AnalysisException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Failed to parse a SQL command.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<div class="viewcode-block" id="IllegalArgumentException"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.IllegalArgumentException.html#pyspark.errors.IllegalArgumentException">[docs]</a><span class="k">class</span> <span class="nc">IllegalArgumentException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Passed an illegal or inappropriate argument.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<span class="k">class</span> <span class="nc">ArithmeticException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Arithmetic exception thrown from Spark with an error class.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">class</span> <span class="nc">UnsupportedOperationException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Unsupported operation exception thrown from Spark with an error class.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">class</span> <span class="nc">ArrayIndexOutOfBoundsException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Array index out of bounds exception thrown from Spark with an error class.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">class</span> <span class="nc">DateTimeException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Datetime exception thrown from Spark with an error class.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">class</span> <span class="nc">NumberFormatException</span><span class="p">(</span><span class="n">IllegalArgumentException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Number format exception thrown from Spark with an error class.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<div class="viewcode-block" id="StreamingQueryException"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.StreamingQueryException.html#pyspark.errors.StreamingQueryException">[docs]</a><span class="k">class</span> <span class="nc">StreamingQueryException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Exception that stopped a :class:`StreamingQuery`.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<div class="viewcode-block" id="QueryExecutionException"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.QueryExecutionException.html#pyspark.errors.QueryExecutionException">[docs]</a><span class="k">class</span> <span class="nc">QueryExecutionException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Failed to execute a query.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<div class="viewcode-block" id="PythonException"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.PythonException.html#pyspark.errors.PythonException">[docs]</a><span class="k">class</span> <span class="nc">PythonException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Exceptions thrown from Python workers.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<span class="k">class</span> <span class="nc">SparkRuntimeException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Runtime exception thrown from Spark with an error class.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<div class="viewcode-block" id="SparkUpgradeException"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.SparkUpgradeException.html#pyspark.errors.SparkUpgradeException">[docs]</a><span class="k">class</span> <span class="nc">SparkUpgradeException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Exception thrown because of Spark upgrade.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<div class="viewcode-block" id="UnknownException"><a class="viewcode-back" href="../../../../reference/api/pyspark.errors.UnknownException.html#pyspark.errors.UnknownException">[docs]</a><span class="k">class</span> <span class="nc">UnknownException</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> None of the above exceptions.</span>
<span class="sd"> &quot;&quot;&quot;</span></div>
<span class="k">class</span> <span class="nc">PySparkValueError</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">,</span> <span class="ne">ValueError</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Wrapper class for ValueError to support error classes.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">class</span> <span class="nc">PySparkTypeError</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">,</span> <span class="ne">TypeError</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Wrapper class for TypeError to support error classes.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">class</span> <span class="nc">PySparkAttributeError</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">,</span> <span class="ne">AttributeError</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Wrapper class for AttributeError to support error classes.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">class</span> <span class="nc">PySparkRuntimeError</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">,</span> <span class="ne">RuntimeError</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Wrapper class for RuntimeError to support error classes.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">class</span> <span class="nc">PySparkAssertionError</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">,</span> <span class="ne">AssertionError</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Wrapper class for AssertionError to support error classes.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">class</span> <span class="nc">PySparkNotImplementedError</span><span class="p">(</span><span class="n">PySparkException</span><span class="p">,</span> <span class="ne">NotImplementedError</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Wrapper class for NotImplementedError to support error classes.</span>
<span class="sd"> &quot;&quot;&quot;</span>
</pre></div>
</div>
<!-- Previous / next buttons -->
<div class='prev-next-area'>
</div>
</main>
</div>
</div>
<script src="../../../../_static/scripts/pydata-sphinx-theme.js?digest=1999514e3f237ded88cf"></script>
<footer class="footer mt-5 mt-md-0">
<div class="container">
<div class="footer-item">
<p class="copyright">
&copy; Copyright .<br>
</p>
</div>
<div class="footer-item">
<p class="sphinx-version">
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 3.0.4.<br>
</p>
</div>
</div>
</footer>
</body>
</html>