• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="ascii"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3          "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6  <title>googleapiclient.errors</title>
7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
8  <script type="text/javascript" src="epydoc.js"></script>
9</head>
10
11<body bgcolor="white" text="black" link="blue" vlink="#204080"
12      alink="#204080">
13<!-- ==================== NAVIGATION BAR ==================== -->
14<table class="navbar" border="0" width="100%" cellpadding="0"
15       bgcolor="#a0c0ff" cellspacing="0">
16  <tr valign="middle">
17  <!-- Home link -->
18      <th>&nbsp;&nbsp;&nbsp;<a
19        href="googleapiclient-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21  <!-- Tree link -->
22      <th>&nbsp;&nbsp;&nbsp;<a
23        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25  <!-- Index link -->
26      <th>&nbsp;&nbsp;&nbsp;<a
27        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29  <!-- Help link -->
30      <th>&nbsp;&nbsp;&nbsp;<a
31        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
33      <th class="navbar" width="100%"></th>
34  </tr>
35</table>
36<table width="100%" cellpadding="0" cellspacing="0">
37  <tr valign="top">
38    <td width="100%">
39      <span class="breadcrumbs">
40        <a href="googleapiclient-module.html">Package&nbsp;googleapiclient</a> ::
41        Module&nbsp;errors
42      </span>
43    </td>
44    <td>
45      <table cellpadding="0" cellspacing="0">
46        <!-- hide/show private -->
47        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
48    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
49        <tr><td align="right"><span class="options"
50            >[<a href="frames.html" target="_top">frames</a
51            >]&nbsp;|&nbsp;<a href="googleapiclient.errors-pysrc.html"
52            target="_top">no&nbsp;frames</a>]</span></td></tr>
53      </table>
54    </td>
55  </tr>
56</table>
57<h1 class="epydoc">Source Code for <a href="googleapiclient.errors-module.html">Module googleapiclient.errors</a></h1>
58<pre class="py-src">
59<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment"># Copyright 2014 Google Inc. All Rights Reserved.</tt> </tt>
60<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
61<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"># Licensed under the Apache License, Version 2.0 (the "License");</tt> </tt>
62<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-comment"># you may not use this file except in compliance with the License.</tt> </tt>
63<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-comment"># You may obtain a copy of the License at</tt> </tt>
64<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
65<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-comment">#      http://www.apache.org/licenses/LICENSE-2.0</tt> </tt>
66<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-comment">#</tt> </tt>
67<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-comment"># Unless required by applicable law or agreed to in writing, software</tt> </tt>
68<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-comment"># distributed under the License is distributed on an "AS IS" BASIS,</tt> </tt>
69<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-comment"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</tt> </tt>
70<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-comment"># See the License for the specific language governing permissions and</tt> </tt>
71<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-comment"># limitations under the License.</tt> </tt>
72<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
73<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line"><tt class="py-docstring">"""Errors for the library.</tt> </tt>
74<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
75<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-docstring">All exceptions defined by the library</tt> </tt>
76<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-docstring">should be defined in this file.</tt> </tt>
77<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
78<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">__future__</tt> <tt class="py-keyword">import</tt> <tt class="py-name">absolute_import</tt> </tt>
79<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
80<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-name">__author__</tt> <tt class="py-op">=</tt> <tt class="py-string">'jcgregorio@google.com (Joe Gregorio)'</tt> </tt>
81<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line"> </tt>
82<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">json</tt> </tt>
83<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"> </tt>
84<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package googleapiclient=googleapiclient-module.html"><a title="googleapiclient" class="py-name" href="#" onclick="return doclink('link-0', 'googleapiclient', 'link-0');">googleapiclient</a></tt> <tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Module googleapiclient._helpers=googleapiclient._helpers-module.html"><a title="googleapiclient._helpers" class="py-name" href="#" onclick="return doclink('link-1', '_helpers', 'link-1');">_helpers</a></tt> <tt class="py-keyword">as</tt> <tt class="py-name">util</tt> </tt>
85<a name="Error"></a><div id="Error-def"><a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line"> </tt>
86<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
87<a name="L29"></a><tt class="py-lineno"> 29</tt> <a class="py-toggle" href="#" id="Error-toggle" onclick="return toggle('Error');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.Error-class.html">Error</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
88</div><div id="Error-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Error-expanded"><a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">  <tt class="py-docstring">"""Base error for this module."""</tt> </tt>
89<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">  <tt class="py-keyword">pass</tt> </tt>
90</div><a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"> </tt>
91<a name="HttpError"></a><div id="HttpError-def"><a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line"> </tt>
92<a name="L34"></a><tt class="py-lineno"> 34</tt> <a class="py-toggle" href="#" id="HttpError-toggle" onclick="return toggle('HttpError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.HttpError-class.html">HttpError</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
93</div><div id="HttpError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="HttpError-expanded"><a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">  <tt class="py-docstring">"""HTTP data was invalid or unexpected."""</tt> </tt>
94<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line"> </tt>
95<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">  <tt class="py-decorator">@</tt><tt class="py-decorator">util</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Function googleapiclient._helpers.positional()=googleapiclient._helpers-module.html#positional"><a title="googleapiclient._helpers.positional" class="py-name" href="#" onclick="return doclink('link-2', 'positional', 'link-2');">positional</a></tt><tt class="py-op">(</tt><tt class="py-number">3</tt><tt class="py-op">)</tt> </tt>
96<a name="HttpError.__init__"></a><div id="HttpError.__init__-def"><a name="L38"></a><tt class="py-lineno"> 38</tt> <a class="py-toggle" href="#" id="HttpError.__init__-toggle" onclick="return toggle('HttpError.__init__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="googleapiclient.errors.HttpError-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">resp</tt><tt class="py-op">,</tt> <tt class="py-param">content</tt><tt class="py-op">,</tt> <tt class="py-param">uri</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
97</div><div id="HttpError.__init__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="HttpError.__init__-expanded"><a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">resp</tt> <tt class="py-op">=</tt> <tt class="py-name">resp</tt> </tt>
98<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">content</tt><tt class="py-op">,</tt> <tt class="py-name">bytes</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
99<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">        <tt class="py-keyword">raise</tt> <tt class="py-name">TypeError</tt><tt class="py-op">(</tt><tt class="py-string">"HTTP content should be bytes"</tt><tt class="py-op">)</tt> </tt>
100<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">content</tt> <tt class="py-op">=</tt> <tt class="py-name">content</tt> </tt>
101<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uri</tt> <tt class="py-op">=</tt> <tt class="py-name">uri</tt> </tt>
102<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_details</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
103</div><a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"> </tt>
104<a name="HttpError._get_reason"></a><div id="HttpError._get_reason-def"><a name="L46"></a><tt class="py-lineno"> 46</tt> <a class="py-toggle" href="#" id="HttpError._get_reason-toggle" onclick="return toggle('HttpError._get_reason');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="googleapiclient.errors.HttpError-class.html#_get_reason">_get_reason</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
105</div><div id="HttpError._get_reason-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="HttpError._get_reason-expanded"><a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">    <tt class="py-docstring">"""Calculate the reason for the error from the response content."""</tt> </tt>
106<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">    <tt class="py-name">reason</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">resp</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt> </tt>
107<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">    <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
108<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">      <tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-name">json</tt><tt class="py-op">.</tt><tt class="py-name">loads</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">content</tt><tt class="py-op">.</tt><tt class="py-name">decode</tt><tt class="py-op">(</tt><tt class="py-string">'utf-8'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
109<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">      <tt class="py-keyword">if</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">dict</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
110<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt class="py-name">reason</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-string">'error'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'message'</tt><tt class="py-op">]</tt> </tt>
111<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'details'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-string">'error'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
112<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_details</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-string">'error'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'details'</tt><tt class="py-op">]</tt> </tt>
113<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">      <tt class="py-keyword">elif</tt> <tt class="py-name">isinstance</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">,</tt> <tt class="py-name">list</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">len</tt><tt class="py-op">(</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> <tt class="py-op">&gt;</tt> <tt class="py-number">0</tt><tt class="py-op">:</tt> </tt>
114<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-name">first_error</tt> <tt class="py-op">=</tt> <tt class="py-name">data</tt><tt class="py-op">[</tt><tt class="py-number">0</tt><tt class="py-op">]</tt> </tt>
115<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-name">reason</tt> <tt class="py-op">=</tt> <tt class="py-name">first_error</tt><tt class="py-op">[</tt><tt class="py-string">'error'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'message'</tt><tt class="py-op">]</tt> </tt>
116<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-string">'details'</tt> <tt class="py-keyword">in</tt> <tt class="py-name">first_error</tt><tt class="py-op">[</tt><tt class="py-string">'error'</tt><tt class="py-op">]</tt><tt class="py-op">:</tt> </tt>
117<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_details</tt> <tt class="py-op">=</tt> <tt class="py-name">first_error</tt><tt class="py-op">[</tt><tt class="py-string">'error'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'details'</tt><tt class="py-op">]</tt> </tt>
118<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">    <tt class="py-keyword">except</tt> <tt class="py-op">(</tt><tt class="py-name">ValueError</tt><tt class="py-op">,</tt> <tt class="py-name">KeyError</tt><tt class="py-op">,</tt> <tt class="py-name">TypeError</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
119<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">      <tt class="py-keyword">pass</tt> </tt>
120<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">reason</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
121<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">      <tt class="py-name">reason</tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
122<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">reason</tt> </tt>
123</div><a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"> </tt>
124<a name="HttpError.__repr__"></a><div id="HttpError.__repr__-def"><a name="L66"></a><tt class="py-lineno"> 66</tt> <a class="py-toggle" href="#" id="HttpError.__repr__-toggle" onclick="return toggle('HttpError.__repr__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="googleapiclient.errors.HttpError-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
125</div><div id="HttpError.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="HttpError.__repr__-expanded"><a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">    <tt class="py-name">reason</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Method googleapiclient.errors.HttpError._get_reason()=googleapiclient.errors.HttpError-class.html#_get_reason"><a title="googleapiclient.errors.HttpError._get_reason" class="py-name" href="#" onclick="return doclink('link-3', '_get_reason', 'link-3');">_get_reason</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
126<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_details</tt><tt class="py-op">:</tt> </tt>
127<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">      <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;HttpError %s when requesting %s returned "%s". Details: "%s"&gt;'</tt> <tt class="py-op">%</tt> \ </tt>
128<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">             <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">resp</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uri</tt><tt class="py-op">,</tt> <tt class="py-name">reason</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">error_details</tt><tt class="py-op">)</tt> </tt>
129<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">    <tt class="py-keyword">elif</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uri</tt><tt class="py-op">:</tt> </tt>
130<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">      <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;HttpError %s when requesting %s returned "%s"&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt> </tt>
131<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">          <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">resp</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">uri</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name"><a title="googleapiclient.errors.HttpError._get_reason" class="py-name" href="#" onclick="return doclink('link-4', '_get_reason', 'link-3');">_get_reason</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
132<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
133<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">      <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;HttpError %s "%s"&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">resp</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-5" class="py-name"><a title="googleapiclient.errors.HttpError._get_reason" class="py-name" href="#" onclick="return doclink('link-5', '_get_reason', 'link-3');">_get_reason</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
134</div><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"> </tt>
135<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">  <tt class="py-name">__str__</tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name" targets="Method googleapiclient.errors.BatchError.__repr__()=googleapiclient.errors.BatchError-class.html#__repr__,Method googleapiclient.errors.HttpError.__repr__()=googleapiclient.errors.HttpError-class.html#__repr__"><a title="googleapiclient.errors.BatchError.__repr__
136googleapiclient.errors.HttpError.__repr__" class="py-name" href="#" onclick="return doclink('link-6', '__repr__', 'link-6');">__repr__</a></tt> </tt>
137</div><a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"> </tt>
138<a name="InvalidJsonError"></a><div id="InvalidJsonError-def"><a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"> </tt>
139<a name="L80"></a><tt class="py-lineno"> 80</tt> <a class="py-toggle" href="#" id="InvalidJsonError-toggle" onclick="return toggle('InvalidJsonError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.InvalidJsonError-class.html">InvalidJsonError</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
140</div><div id="InvalidJsonError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="InvalidJsonError-expanded"><a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">  <tt class="py-docstring">"""The JSON returned could not be parsed."""</tt> </tt>
141<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">  <tt class="py-keyword">pass</tt> </tt>
142</div><a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line"> </tt>
143<a name="UnknownFileType"></a><div id="UnknownFileType-def"><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"> </tt>
144<a name="L85"></a><tt class="py-lineno"> 85</tt> <a class="py-toggle" href="#" id="UnknownFileType-toggle" onclick="return toggle('UnknownFileType');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.UnknownFileType-class.html">UnknownFileType</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
145</div><div id="UnknownFileType-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="UnknownFileType-expanded"><a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">  <tt class="py-docstring">"""File type unknown or unexpected."""</tt> </tt>
146<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">  <tt class="py-keyword">pass</tt> </tt>
147</div><a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line"> </tt>
148<a name="UnknownLinkType"></a><div id="UnknownLinkType-def"><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line"> </tt>
149<a name="L90"></a><tt class="py-lineno"> 90</tt> <a class="py-toggle" href="#" id="UnknownLinkType-toggle" onclick="return toggle('UnknownLinkType');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.UnknownLinkType-class.html">UnknownLinkType</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
150</div><div id="UnknownLinkType-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="UnknownLinkType-expanded"><a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">  <tt class="py-docstring">"""Link type unknown or unexpected."""</tt> </tt>
151<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">  <tt class="py-keyword">pass</tt> </tt>
152</div><a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"> </tt>
153<a name="UnknownApiNameOrVersion"></a><div id="UnknownApiNameOrVersion-def"><a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"> </tt>
154<a name="L95"></a><tt class="py-lineno"> 95</tt> <a class="py-toggle" href="#" id="UnknownApiNameOrVersion-toggle" onclick="return toggle('UnknownApiNameOrVersion');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.UnknownApiNameOrVersion-class.html">UnknownApiNameOrVersion</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
155</div><div id="UnknownApiNameOrVersion-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="UnknownApiNameOrVersion-expanded"><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">  <tt class="py-docstring">"""No API with that name and version exists."""</tt> </tt>
156<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">  <tt class="py-keyword">pass</tt> </tt>
157</div><a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"> </tt>
158<a name="UnacceptableMimeTypeError"></a><div id="UnacceptableMimeTypeError-def"><a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"> </tt>
159<a name="L100"></a><tt class="py-lineno">100</tt> <a class="py-toggle" href="#" id="UnacceptableMimeTypeError-toggle" onclick="return toggle('UnacceptableMimeTypeError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.UnacceptableMimeTypeError-class.html">UnacceptableMimeTypeError</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
160</div><div id="UnacceptableMimeTypeError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="UnacceptableMimeTypeError-expanded"><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">  <tt class="py-docstring">"""That is an unacceptable mimetype for this operation."""</tt> </tt>
161<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">  <tt class="py-keyword">pass</tt> </tt>
162</div><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"> </tt>
163<a name="MediaUploadSizeError"></a><div id="MediaUploadSizeError-def"><a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line"> </tt>
164<a name="L105"></a><tt class="py-lineno">105</tt> <a class="py-toggle" href="#" id="MediaUploadSizeError-toggle" onclick="return toggle('MediaUploadSizeError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.MediaUploadSizeError-class.html">MediaUploadSizeError</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
165</div><div id="MediaUploadSizeError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="MediaUploadSizeError-expanded"><a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">  <tt class="py-docstring">"""Media is larger than the method can accept."""</tt> </tt>
166<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">  <tt class="py-keyword">pass</tt> </tt>
167</div><a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"> </tt>
168<a name="ResumableUploadError"></a><div id="ResumableUploadError-def"><a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line"> </tt>
169<a name="L110"></a><tt class="py-lineno">110</tt> <a class="py-toggle" href="#" id="ResumableUploadError-toggle" onclick="return toggle('ResumableUploadError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.ResumableUploadError-class.html">ResumableUploadError</a><tt class="py-op">(</tt><tt class="py-base-class">HttpError</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
170</div><div id="ResumableUploadError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ResumableUploadError-expanded"><a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">  <tt class="py-docstring">"""Error occured during resumable upload."""</tt> </tt>
171<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">  <tt class="py-keyword">pass</tt> </tt>
172</div><a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line"> </tt>
173<a name="InvalidChunkSizeError"></a><div id="InvalidChunkSizeError-def"><a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"> </tt>
174<a name="L115"></a><tt class="py-lineno">115</tt> <a class="py-toggle" href="#" id="InvalidChunkSizeError-toggle" onclick="return toggle('InvalidChunkSizeError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.InvalidChunkSizeError-class.html">InvalidChunkSizeError</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
175</div><div id="InvalidChunkSizeError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="InvalidChunkSizeError-expanded"><a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">  <tt class="py-docstring">"""The given chunksize is not valid."""</tt> </tt>
176<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">  <tt class="py-keyword">pass</tt> </tt>
177</div><a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"> </tt>
178<a name="InvalidNotificationError"></a><div id="InvalidNotificationError-def"><a name="L119"></a><tt class="py-lineno">119</tt> <a class="py-toggle" href="#" id="InvalidNotificationError-toggle" onclick="return toggle('InvalidNotificationError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.InvalidNotificationError-class.html">InvalidNotificationError</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
179</div><div id="InvalidNotificationError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="InvalidNotificationError-expanded"><a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">  <tt class="py-docstring">"""The channel Notification is invalid."""</tt> </tt>
180<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">  <tt class="py-keyword">pass</tt> </tt>
181</div><a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line"> </tt>
182<a name="BatchError"></a><div id="BatchError-def"><a name="L123"></a><tt class="py-lineno">123</tt> <a class="py-toggle" href="#" id="BatchError-toggle" onclick="return toggle('BatchError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.BatchError-class.html">BatchError</a><tt class="py-op">(</tt><tt class="py-base-class">HttpError</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
183</div><div id="BatchError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="BatchError-expanded"><a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">  <tt class="py-docstring">"""Error occured during batch operations."""</tt> </tt>
184<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line"> </tt>
185<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">  <tt class="py-decorator">@</tt><tt class="py-decorator">util</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="googleapiclient._helpers.positional" class="py-name" href="#" onclick="return doclink('link-7', 'positional', 'link-2');">positional</a></tt><tt class="py-op">(</tt><tt class="py-number">2</tt><tt class="py-op">)</tt> </tt>
186<a name="BatchError.__init__"></a><div id="BatchError.__init__-def"><a name="L127"></a><tt class="py-lineno">127</tt> <a class="py-toggle" href="#" id="BatchError.__init__-toggle" onclick="return toggle('BatchError.__init__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="googleapiclient.errors.BatchError-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">reason</tt><tt class="py-op">,</tt> <tt class="py-param">resp</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">,</tt> <tt class="py-param">content</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
187</div><div id="BatchError.__init__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="BatchError.__init__-expanded"><a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">resp</tt> <tt class="py-op">=</tt> <tt class="py-name">resp</tt> </tt>
188<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">content</tt> <tt class="py-op">=</tt> <tt class="py-name">content</tt> </tt>
189<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt> <tt class="py-op">=</tt> <tt class="py-name">reason</tt> </tt>
190</div><a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"> </tt>
191<a name="BatchError.__repr__"></a><div id="BatchError.__repr__-def"><a name="L132"></a><tt class="py-lineno">132</tt> <a class="py-toggle" href="#" id="BatchError.__repr__-toggle" onclick="return toggle('BatchError.__repr__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="googleapiclient.errors.BatchError-class.html#__repr__">__repr__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
192</div><div id="BatchError.__repr__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="BatchError.__repr__-expanded"><a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-name">getattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">resp</tt><tt class="py-op">,</tt> <tt class="py-string">'status'</tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> <tt class="py-keyword">is</tt> <tt class="py-name">None</tt><tt class="py-op">:</tt> </tt>
193<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">      <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;BatchError "%s"&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
194<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">    <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
195<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">      <tt class="py-keyword">return</tt> <tt class="py-string">'&lt;BatchError %s "%s"&gt;'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">resp</tt><tt class="py-op">.</tt><tt class="py-name">status</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">reason</tt><tt class="py-op">)</tt> </tt>
196</div><a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"> </tt>
197<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">  <tt class="py-name">__str__</tt> <tt class="py-op">=</tt> <tt id="link-8" class="py-name"><a title="googleapiclient.errors.BatchError.__repr__
198googleapiclient.errors.HttpError.__repr__" class="py-name" href="#" onclick="return doclink('link-8', '__repr__', 'link-6');">__repr__</a></tt> </tt>
199</div><a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"> </tt>
200<a name="UnexpectedMethodError"></a><div id="UnexpectedMethodError-def"><a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"> </tt>
201<a name="L141"></a><tt class="py-lineno">141</tt> <a class="py-toggle" href="#" id="UnexpectedMethodError-toggle" onclick="return toggle('UnexpectedMethodError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.UnexpectedMethodError-class.html">UnexpectedMethodError</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
202</div><div id="UnexpectedMethodError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="UnexpectedMethodError-expanded"><a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">  <tt class="py-docstring">"""Exception raised by RequestMockBuilder on unexpected calls."""</tt> </tt>
203<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line"> </tt>
204<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">  <tt class="py-decorator">@</tt><tt class="py-decorator">util</tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="googleapiclient._helpers.positional" class="py-name" href="#" onclick="return doclink('link-9', 'positional', 'link-2');">positional</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
205<a name="UnexpectedMethodError.__init__"></a><div id="UnexpectedMethodError.__init__-def"><a name="L145"></a><tt class="py-lineno">145</tt> <a class="py-toggle" href="#" id="UnexpectedMethodError.__init__-toggle" onclick="return toggle('UnexpectedMethodError.__init__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="googleapiclient.errors.UnexpectedMethodError-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">methodId</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
206</div><div id="UnexpectedMethodError.__init__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="UnexpectedMethodError.__init__-expanded"><a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">    <tt class="py-docstring">"""Constructor for an UnexpectedMethodError."""</tt> </tt>
207<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line">    <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-10" class="py-name" targets="Class googleapiclient.errors.UnexpectedMethodError=googleapiclient.errors.UnexpectedMethodError-class.html"><a title="googleapiclient.errors.UnexpectedMethodError" class="py-name" href="#" onclick="return doclink('link-10', 'UnexpectedMethodError', 'link-10');">UnexpectedMethodError</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Method googleapiclient.channel.Channel.__init__()=googleapiclient.channel.Channel-class.html#__init__,Method googleapiclient.channel.Notification.__init__()=googleapiclient.channel.Notification-class.html#__init__,Method googleapiclient.discovery.Resource.__init__()=googleapiclient.discovery.Resource-class.html#__init__,Method googleapiclient.discovery.ResourceMethodParameters.__init__()=googleapiclient.discovery.ResourceMethodParameters-class.html#__init__,Method googleapiclient.discovery_cache.appengine_memcache.Cache.__init__()=googleapiclient.discovery_cache.appengine_memcache.Cache-class.html#__init__,Method googleapiclient.discovery_cache.file_cache.Cache.__init__()=googleapiclient.discovery_cache.file_cache.Cache-class.html#__init__,Method googleapiclient.errors.BatchError.__init__()=googleapiclient.errors.BatchError-class.html#__init__,Method googleapiclient.errors.HttpError.__init__()=googleapiclient.errors.HttpError-class.html#__init__,Method googleapiclient.errors.UnexpectedBodyError.__init__()=googleapiclient.errors.UnexpectedBodyError-class.html#__init__,Method googleapiclient.errors.UnexpectedMethodError.__init__()=googleapiclient.errors.UnexpectedMethodError-class.html#__init__,Method googleapiclient.http.BatchHttpRequest.__init__()=googleapiclient.http.BatchHttpRequest-class.html#__init__,Method googleapiclient.http.HttpMock.__init__()=googleapiclient.http.HttpMock-class.html#__init__,Method googleapiclient.http.HttpMockSequence.__init__()=googleapiclient.http.HttpMockSequence-class.html#__init__,Method googleapiclient.http.HttpRequest.__init__()=googleapiclient.http.HttpRequest-class.html#__init__,Method googleapiclient.http.HttpRequestMock.__init__()=googleapiclient.http.HttpRequestMock-class.html#__init__,Method googleapiclient.http.MediaDownloadProgress.__init__()=googleapiclient.http.MediaDownloadProgress-class.html#__init__,Method googleapiclient.http.MediaFileUpload.__init__()=googleapiclient.http.MediaFileUpload-class.html#__init__,Method googleapiclient.http.MediaInMemoryUpload.__init__()=googleapiclient.http.MediaInMemoryUpload-class.html#__init__,Method googleapiclient.http.MediaIoBaseDownload.__init__()=googleapiclient.http.MediaIoBaseDownload-class.html#__init__,Method googleapiclient.http.MediaIoBaseUpload.__init__()=googleapiclient.http.MediaIoBaseUpload-class.html#__init__,Method googleapiclient.http.MediaUploadProgress.__init__()=googleapiclient.http.MediaUploadProgress-class.html#__init__,Method googleapiclient.http.RequestMockBuilder.__init__()=googleapiclient.http.RequestMockBuilder-class.html#__init__,Method googleapiclient.http._StreamSlice.__init__()=googleapiclient.http._StreamSlice-class.html#__init__,Method googleapiclient.model.JsonModel.__init__()=googleapiclient.model.JsonModel-class.html#__init__,Method googleapiclient.model.ProtocolBufferModel.__init__()=googleapiclient.model.ProtocolBufferModel-class.html#__init__,Method googleapiclient.schema.Schemas.__init__()=googleapiclient.schema.Schemas-class.html#__init__,Method googleapiclient.schema._SchemaToStruct.__init__()=googleapiclient.schema._SchemaToStruct-class.html#__init__"><a title="googleapiclient.channel.Channel.__init__
208googleapiclient.channel.Notification.__init__
209googleapiclient.discovery.Resource.__init__
210googleapiclient.discovery.ResourceMethodParameters.__init__
211googleapiclient.discovery_cache.appengine_memcache.Cache.__init__
212googleapiclient.discovery_cache.file_cache.Cache.__init__
213googleapiclient.errors.BatchError.__init__
214googleapiclient.errors.HttpError.__init__
215googleapiclient.errors.UnexpectedBodyError.__init__
216googleapiclient.errors.UnexpectedMethodError.__init__
217googleapiclient.http.BatchHttpRequest.__init__
218googleapiclient.http.HttpMock.__init__
219googleapiclient.http.HttpMockSequence.__init__
220googleapiclient.http.HttpRequest.__init__
221googleapiclient.http.HttpRequestMock.__init__
222googleapiclient.http.MediaDownloadProgress.__init__
223googleapiclient.http.MediaFileUpload.__init__
224googleapiclient.http.MediaInMemoryUpload.__init__
225googleapiclient.http.MediaIoBaseDownload.__init__
226googleapiclient.http.MediaIoBaseUpload.__init__
227googleapiclient.http.MediaUploadProgress.__init__
228googleapiclient.http.RequestMockBuilder.__init__
229googleapiclient.http._StreamSlice.__init__
230googleapiclient.model.JsonModel.__init__
231googleapiclient.model.ProtocolBufferModel.__init__
232googleapiclient.schema.Schemas.__init__
233googleapiclient.schema._SchemaToStruct.__init__" class="py-name" href="#" onclick="return doclink('link-11', '__init__', 'link-11');">__init__</a></tt><tt class="py-op">(</tt> </tt>
234<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">        <tt class="py-string">'Received unexpected call %s'</tt> <tt class="py-op">%</tt> <tt class="py-name">methodId</tt><tt class="py-op">)</tt> </tt>
235</div></div><a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line"> </tt>
236<a name="UnexpectedBodyError"></a><div id="UnexpectedBodyError-def"><a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line"> </tt>
237<a name="L151"></a><tt class="py-lineno">151</tt> <a class="py-toggle" href="#" id="UnexpectedBodyError-toggle" onclick="return toggle('UnexpectedBodyError');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="googleapiclient.errors.UnexpectedBodyError-class.html">UnexpectedBodyError</a><tt class="py-op">(</tt><tt class="py-base-class">Error</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
238</div><div id="UnexpectedBodyError-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="UnexpectedBodyError-expanded"><a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line">  <tt class="py-docstring">"""Exception raised by RequestMockBuilder on unexpected bodies."""</tt> </tt>
239<a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line"> </tt>
240<a name="UnexpectedBodyError.__init__"></a><div id="UnexpectedBodyError.__init__-def"><a name="L154"></a><tt class="py-lineno">154</tt> <a class="py-toggle" href="#" id="UnexpectedBodyError.__init__-toggle" onclick="return toggle('UnexpectedBodyError.__init__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="googleapiclient.errors.UnexpectedBodyError-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">expected</tt><tt class="py-op">,</tt> <tt class="py-param">provided</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
241</div><div id="UnexpectedBodyError.__init__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="UnexpectedBodyError.__init__-expanded"><a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">    <tt class="py-docstring">"""Constructor for an UnexpectedMethodError."""</tt> </tt>
242<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">    <tt class="py-name">super</tt><tt class="py-op">(</tt><tt id="link-12" class="py-name" targets="Class googleapiclient.errors.UnexpectedBodyError=googleapiclient.errors.UnexpectedBodyError-class.html"><a title="googleapiclient.errors.UnexpectedBodyError" class="py-name" href="#" onclick="return doclink('link-12', 'UnexpectedBodyError', 'link-12');">UnexpectedBodyError</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name"><a title="googleapiclient.channel.Channel.__init__
243googleapiclient.channel.Notification.__init__
244googleapiclient.discovery.Resource.__init__
245googleapiclient.discovery.ResourceMethodParameters.__init__
246googleapiclient.discovery_cache.appengine_memcache.Cache.__init__
247googleapiclient.discovery_cache.file_cache.Cache.__init__
248googleapiclient.errors.BatchError.__init__
249googleapiclient.errors.HttpError.__init__
250googleapiclient.errors.UnexpectedBodyError.__init__
251googleapiclient.errors.UnexpectedMethodError.__init__
252googleapiclient.http.BatchHttpRequest.__init__
253googleapiclient.http.HttpMock.__init__
254googleapiclient.http.HttpMockSequence.__init__
255googleapiclient.http.HttpRequest.__init__
256googleapiclient.http.HttpRequestMock.__init__
257googleapiclient.http.MediaDownloadProgress.__init__
258googleapiclient.http.MediaFileUpload.__init__
259googleapiclient.http.MediaInMemoryUpload.__init__
260googleapiclient.http.MediaIoBaseDownload.__init__
261googleapiclient.http.MediaIoBaseUpload.__init__
262googleapiclient.http.MediaUploadProgress.__init__
263googleapiclient.http.RequestMockBuilder.__init__
264googleapiclient.http._StreamSlice.__init__
265googleapiclient.model.JsonModel.__init__
266googleapiclient.model.ProtocolBufferModel.__init__
267googleapiclient.schema.Schemas.__init__
268googleapiclient.schema._SchemaToStruct.__init__" class="py-name" href="#" onclick="return doclink('link-13', '__init__', 'link-11');">__init__</a></tt><tt class="py-op">(</tt> </tt>
269<a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line">        <tt class="py-string">'Expected: [%s] - Provided: [%s]'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">expected</tt><tt class="py-op">,</tt> <tt class="py-name">provided</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
270</div></div><a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line"> </tt><script type="text/javascript">
271<!--
272expandto(location.href);
273// -->
274</script>
275</pre>
276<br />
277<!-- ==================== NAVIGATION BAR ==================== -->
278<table class="navbar" border="0" width="100%" cellpadding="0"
279       bgcolor="#a0c0ff" cellspacing="0">
280  <tr valign="middle">
281  <!-- Home link -->
282      <th>&nbsp;&nbsp;&nbsp;<a
283        href="googleapiclient-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
284
285  <!-- Tree link -->
286      <th>&nbsp;&nbsp;&nbsp;<a
287        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
288
289  <!-- Index link -->
290      <th>&nbsp;&nbsp;&nbsp;<a
291        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
292
293  <!-- Help link -->
294      <th>&nbsp;&nbsp;&nbsp;<a
295        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
296
297      <th class="navbar" width="100%"></th>
298  </tr>
299</table>
300<table border="0" cellpadding="0" cellspacing="0" width="100%%">
301  <tr>
302    <td align="left" class="footer">
303    Generated by Epydoc 3.0.1 on Fri Jun 14 15:57:29 2019
304    </td>
305    <td align="right" class="footer">
306      <a target="mainFrame" href="http://epydoc.sourceforge.net"
307        >http://epydoc.sourceforge.net</a>
308    </td>
309  </tr>
310</table>
311
312<script type="text/javascript">
313  <!--
314  // Private objects are initially displayed (because if
315  // javascript is turned off then we want them to be
316  // visible); but by default, we want to hide them.  So hide
317  // them unless we have a cookie that says to show them.
318  checkCookie();
319  // -->
320</script>
321</body>
322</html>
323