Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > bc55833f04f370ac3ed453ef5b0ad686 > files > 250

python2-gridfs-3.7.2-1.mga7.i586.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>errors – Exceptions raised by the pymongo package &#8212; PyMongo 3.7.2 documentation</title>
    <link rel="stylesheet" href="../../_static/pydoctheme.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/language_data.js"></script>
    
    <script type="text/javascript" src="../../_static/sidebar.js"></script>
    
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="message – Tools for creating messages to be sent to MongoDB" href="message.html" />
    <link rel="prev" title="driver_info" href="driver_info.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="message.html" title="message – Tools for creating messages to be sent to MongoDB"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="driver_info.html" title="driver_info"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">PyMongo 3.7.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../index.html" >API Documentation</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" accesskey="U"><code class="docutils literal notranslate"><span class="pre">pymongo</span></code> – Python driver for MongoDB</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-pymongo.errors">
<span id="errors-exceptions-raised-by-the-pymongo-package"></span><h1><code class="xref py py-mod docutils literal notranslate"><span class="pre">errors</span></code> – Exceptions raised by the <a class="reference internal" href="index.html#module-pymongo" title="pymongo: Python driver for MongoDB"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pymongo</span></code></a> package<a class="headerlink" href="#module-pymongo.errors" title="Permalink to this headline">¶</a></h1>
<p>Exceptions raised by PyMongo.</p>
<dl class="exception">
<dt id="pymongo.errors.AutoReconnect">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">AutoReconnect</code><span class="sig-paren">(</span><em>message=''</em>, <em>errors=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.AutoReconnect" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a connection to the database is lost and an attempt to
auto-reconnect will be made.</p>
<p>In order to auto-reconnect you must handle this exception, recognizing that
the operation which caused it has not necessarily succeeded. Future
operations will attempt to open a new connection to the database (and
will continue to raise this exception until the first successful
connection is made).</p>
<p>Subclass of <a class="reference internal" href="#pymongo.errors.ConnectionFailure" title="pymongo.errors.ConnectionFailure"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ConnectionFailure</span></code></a>.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.BulkWriteError">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">BulkWriteError</code><span class="sig-paren">(</span><em>results</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.BulkWriteError" title="Permalink to this definition">¶</a></dt>
<dd><p>Exception class for bulk write errors.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 2.7.</span></p>
</div>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.CollectionInvalid">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">CollectionInvalid</code><span class="sig-paren">(</span><em>message=''</em>, <em>error_labels=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.CollectionInvalid" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when collection validation fails.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.ConfigurationError">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">ConfigurationError</code><span class="sig-paren">(</span><em>message=''</em>, <em>error_labels=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.ConfigurationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when something is incorrectly configured.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.ConnectionFailure">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">ConnectionFailure</code><span class="sig-paren">(</span><em>message=''</em>, <em>error_labels=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.ConnectionFailure" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a connection to the database cannot be made or is lost.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.CursorNotFound">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">CursorNotFound</code><span class="sig-paren">(</span><em>error</em>, <em>code=None</em>, <em>details=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.CursorNotFound" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised while iterating query results if the cursor is
invalidated on the server.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 2.7.</span></p>
</div>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.DocumentTooLarge">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">DocumentTooLarge</code><a class="headerlink" href="#pymongo.errors.DocumentTooLarge" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when an encoded document is too large for the connected server.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.DuplicateKeyError">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">DuplicateKeyError</code><span class="sig-paren">(</span><em>error</em>, <em>code=None</em>, <em>details=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.DuplicateKeyError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when an insert or update fails due to a duplicate key error.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.ExceededMaxWaiters">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">ExceededMaxWaiters</code><a class="headerlink" href="#pymongo.errors.ExceededMaxWaiters" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a thread tries to get a connection from a pool and
<code class="docutils literal notranslate"><span class="pre">maxPoolSize</span> <span class="pre">*</span> <span class="pre">waitQueueMultiple</span></code> threads are already waiting.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 2.6.</span></p>
</div>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.ExecutionTimeout">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">ExecutionTimeout</code><span class="sig-paren">(</span><em>error</em>, <em>code=None</em>, <em>details=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.ExecutionTimeout" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a database operation times out, exceeding the $maxTimeMS
set in the query or command option.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Requires server version <strong>&gt;= 2.6.0</strong></p>
</div>
<div class="versionadded">
<p><span class="versionmodified">New in version 2.7.</span></p>
</div>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.InvalidName">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">InvalidName</code><span class="sig-paren">(</span><em>message=''</em>, <em>error_labels=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.InvalidName" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when an invalid name is used.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.InvalidOperation">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">InvalidOperation</code><span class="sig-paren">(</span><em>message=''</em>, <em>error_labels=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.InvalidOperation" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a client attempts to perform an invalid operation.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.InvalidURI">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">InvalidURI</code><span class="sig-paren">(</span><em>message=''</em>, <em>error_labels=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.InvalidURI" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when trying to parse an invalid mongodb URI.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.NetworkTimeout">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">NetworkTimeout</code><span class="sig-paren">(</span><em>message=''</em>, <em>errors=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.NetworkTimeout" title="Permalink to this definition">¶</a></dt>
<dd><p>An operation on an open connection exceeded socketTimeoutMS.</p>
<p>The remaining connections in the pool stay open. In the case of a write
operation, you cannot know whether it succeeded or failed.</p>
<p>Subclass of <a class="reference internal" href="#pymongo.errors.AutoReconnect" title="pymongo.errors.AutoReconnect"><code class="xref py py-exc docutils literal notranslate"><span class="pre">AutoReconnect</span></code></a>.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.NotMasterError">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">NotMasterError</code><span class="sig-paren">(</span><em>message=''</em>, <em>errors=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.NotMasterError" title="Permalink to this definition">¶</a></dt>
<dd><p>The server responded “not master” or “node is recovering”.</p>
<p>These errors result from a query, write, or command. The operation failed
because the client thought it was using the primary but the primary has
stepped down, or the client thought it was using a healthy secondary but
the secondary is stale and trying to recover.</p>
<p>The client launches a refresh operation on a background thread, to update
its view of the server as soon as possible after throwing this exception.</p>
<p>Subclass of <a class="reference internal" href="#pymongo.errors.AutoReconnect" title="pymongo.errors.AutoReconnect"><code class="xref py py-exc docutils literal notranslate"><span class="pre">AutoReconnect</span></code></a>.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.OperationFailure">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">OperationFailure</code><span class="sig-paren">(</span><em>error</em>, <em>code=None</em>, <em>details=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.OperationFailure" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a database operation fails.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 2.7: </span>The <a class="reference internal" href="#pymongo.errors.OperationFailure.details" title="pymongo.errors.OperationFailure.details"><code class="xref py py-attr docutils literal notranslate"><span class="pre">details</span></code></a> attribute.</p>
</div>
<dl class="attribute">
<dt id="pymongo.errors.OperationFailure.code">
<code class="descname">code</code><a class="headerlink" href="#pymongo.errors.OperationFailure.code" title="Permalink to this definition">¶</a></dt>
<dd><p>The error code returned by the server, if any.</p>
</dd></dl>

<dl class="attribute">
<dt id="pymongo.errors.OperationFailure.details">
<code class="descname">details</code><a class="headerlink" href="#pymongo.errors.OperationFailure.details" title="Permalink to this definition">¶</a></dt>
<dd><p>The complete error document returned by the server.</p>
<p>Depending on the error that occurred, the error document
may include useful information beyond just the error
message. When connected to a mongos the error document
may contain one or more subdocuments if errors occurred
on multiple shards.</p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.ProtocolError">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">ProtocolError</code><span class="sig-paren">(</span><em>message=''</em>, <em>error_labels=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.ProtocolError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised for failures related to the wire protocol.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.PyMongoError">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">PyMongoError</code><span class="sig-paren">(</span><em>message=''</em>, <em>error_labels=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.PyMongoError" title="Permalink to this definition">¶</a></dt>
<dd><p>Base class for all PyMongo exceptions.</p>
<dl class="method">
<dt id="pymongo.errors.PyMongoError.has_error_label">
<code class="descname">has_error_label</code><span class="sig-paren">(</span><em>label</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.PyMongoError.has_error_label" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if this error contains the given label.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.7.</span></p>
</div>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.ServerSelectionTimeoutError">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">ServerSelectionTimeoutError</code><span class="sig-paren">(</span><em>message=''</em>, <em>errors=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.ServerSelectionTimeoutError" title="Permalink to this definition">¶</a></dt>
<dd><p>Thrown when no MongoDB server is available for an operation</p>
<p>If there is no suitable server for an operation PyMongo tries for
<code class="docutils literal notranslate"><span class="pre">serverSelectionTimeoutMS</span></code> (default 30 seconds) to find one, then
throws this exception. For example, it is thrown after attempting an
operation when PyMongo cannot connect to any server, or if you attempt
an insert into a replica set that has no primary and does not elect one
within the timeout window, or if you attempt to query with a Read
Preference that the replica set cannot satisfy.</p>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.WTimeoutError">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">WTimeoutError</code><span class="sig-paren">(</span><em>error</em>, <em>code=None</em>, <em>details=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.WTimeoutError" title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a database operation times out (i.e. wtimeout expires)
before replication completes.</p>
<p>With newer versions of MongoDB the <cite>details</cite> attribute may include
write concern fields like ‘n’, ‘updatedExisting’, or ‘writtenTo’.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 2.7.</span></p>
</div>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.WriteConcernError">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">WriteConcernError</code><span class="sig-paren">(</span><em>error</em>, <em>code=None</em>, <em>details=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.WriteConcernError" title="Permalink to this definition">¶</a></dt>
<dd><p>Base exception type for errors raised due to write concern.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.0.</span></p>
</div>
</dd></dl>

<dl class="exception">
<dt id="pymongo.errors.WriteError">
<em class="property">exception </em><code class="descclassname">pymongo.errors.</code><code class="descname">WriteError</code><span class="sig-paren">(</span><em>error</em>, <em>code=None</em>, <em>details=None</em><span class="sig-paren">)</span><a class="headerlink" href="#pymongo.errors.WriteError" title="Permalink to this definition">¶</a></dt>
<dd><p>Base exception type for errors raised during write operations.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 3.0.</span></p>
</div>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="driver_info.html"
                        title="previous chapter"><code class="docutils literal notranslate"><span class="pre">driver_info</span></code></a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="message.html"
                        title="next chapter"><code class="docutils literal notranslate"><span class="pre">message</span></code> – Tools for creating messages to be sent to MongoDB</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/api/pymongo/errors.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="message.html" title="message – Tools for creating messages to be sent to MongoDB"
             >next</a> |</li>
        <li class="right" >
          <a href="driver_info.html" title="driver_info"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../index.html">PyMongo 3.7.2 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../index.html" >API Documentation</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" ><code class="docutils literal notranslate"><span class="pre">pymongo</span></code> – Python driver for MongoDB</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright MongoDB, Inc. 2008-present. MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc.
    </div>
  </body>
</html>