title: Puzzling 404 error when attempting file export with Python SDK
body: <p>I am attempting to export <a href="https://docs.google.com/document/d/110vUov9J9rg2b1XoHMZ3Ssb4Z-FUUPKNQckuyxn_gmo/edit?usp=sharing" rel="nofollow noreferrer">a public file from Google Drive</a> to local drive using Google's python API client library. </p>
  
  <p>I am using <a href="https://gist.github.com/aaronpolhamus/9df340f8bfbde4534ffe0523eb4b9a32" rel="nofollow noreferrer">this script</a>, which is an adapted example of <a href="http://wescpy.blogspot.mx/2015/12/google-drive-uploading-downloading.html" rel="nofollow noreferrer">this tutorial</a>. I've verified that my credentials are working and have been working with <code>create</code> and <code>update</code> methods all day without any problem. </p>
  
  <p>When I run <code>python api_demo.py</code> from the command line I get the expected result, with a PDF stored to my local drive:</p>
  
  <pre><code>aaronpolhamus$ python api_demo.py
    Uploaded "hello.txt" (text/plain)
    Uploaded "hello.txt" (application/vnd.google-apps.document)
    fileId: P110vUov9J9rg2b1XoHMZ3Ssb4Z-FUUPKNQckuyxn_gmo
    mimeType: application/pdf
    Downloaded "hello.pdf" (application/pdf)
  </code></pre>
  
  <p>However, when I enter the python shell to work interactively I just <em>cannot</em> get this running. Here's how it looks: </p>
  
  <pre><code>In [1]: DRIVE.files().export(fileId='P110vUov9J9rg2b1XoHMZ3Ssb4Z-FUUPKNQckuyxn_gmo', mimeType='application/pdf').execute()
  
  /Users/aaronpolhamus/anaconda/envs/credijusto/lib/python3.6/site-packages/oauth2client/_helpers.py in positional_wrapper(*args, **kwargs)
  131                 elif positional_parameters_enforcement == POSITIONAL_WARNING:
  132                     logger.warning(message)
  --&gt; 133             return wrapped(*args, **kwargs)
  134         return positional_wrapper
  135 
  
  /Users/aaronpolhamus/anaconda/envs/credijusto/lib/python3.6/site-packages/googleapiclient/http.py in execute(self, http, num_retries)
  838       callback(resp)
  839     if resp.status &gt;= 300:
  --&gt; 840       raise HttpError(resp, content, uri=self.uri)
  841     return self.postproc(resp, content)
  842 
  
  HttpError: &lt;HttpError 404 when requesting https://www.googleapis.com/drive/v3/files/P110vUov9J9rg2b1XoHMZ3Ssb4Z-FUUPKNQckuyxn_gmo/export?mimeType=application%2Fpdf returned "File not found: P110vUov9J9rg2b1XoHMZ3Ssb4Z-FUUPKNQckuyxn_gmo."&gt;
  </code></pre>
  
  <p>Now, the <code>fileId</code> doesn't actually have that leading <code>P1</code> if you go to the link. I tried chopping those first two characters off and wound up with a <code>500</code> error: </p>
  
  <pre><code>In [2]: DRIVE.files().export(fileId='10vUov9J9rg2b1XoHMZ3Ssb4Z-FUUPKNQckuyxn_gmo', mimeType='application/pdf').execute()
  
  HttpError                                 Traceback (most recent call last)
  &lt;ipython-input-237-764cc68cfa0e&gt; in &lt;module&gt;()
  ----&gt; 1 DRIVE.files().export(fileId='10vUov9J9rg2b1XoHMZ3Ssb4Z-FUUPKNQckuyxn_gmo', mimeType='application/pdf').execute()
  
  /Users/aaronpolhamus/anaconda/envs/credijusto/lib/python3.6/site-packages/oauth2client/_helpers.py in positional_wrapper(*args, **kwargs)
  131                 elif positional_parameters_enforcement == POSITIONAL_WARNING:
  132                     logger.warning(message)
  --&gt; 133             return wrapped(*args, **kwargs)
  134         return positional_wrapper
  135 
  
  /Users/aaronpolhamus/anaconda/envs/credijusto/lib/python3.6/site-packages/googleapiclient/http.py in execute(self, http, num_retries)
  838       callback(resp)
  839     if resp.status &gt;= 300:
  --&gt; 840       raise HttpError(resp, content, uri=self.uri)
  841     return self.postproc(resp, content)
  842 
  
  HttpError: &lt;HttpError 500 when requesting https://www.googleapis.com/drive/v3/files/10vUov9J9rg2b1XoHMZ3Ssb4Z-FUUPKNQckuyxn_gmo/export?mimeType=application%2Fpdf returned "Internal Error"&gt;
  </code></pre>
  
  <p>The difference between the command line and interactive cases are puzzling, as is the result that I can produce different errors but haven't gotten any closer to actually figuring out what's going on. I am doing the exact same operation, pasting in identical values to those printed in terminal.  </p>
  
  <p>Both code and sample data are public. Any help? </p>