title: Downloading excel file from Box.com by using python 3.6.3
body: <p>I have read many posts, but I'm still struglling some problem.
  I'm trying to download excel file file from Box.com to cet os folder by using python script. Here, I'm using Box API to download file.</p>
  
  <pre><code>#!/usr/bin/env python3
  
  #import two classes from the boxsdk module - Client and OAuth2
  from boxsdk import Client, OAuth2
  
  # Define client ID, client secret, and developer token.
  CLIENT_ID = None
  CLIENT_SECRET = None
  ACCESS_TOKEN = None
  
  # Read app info from text file
  with open('app.cfg', 'r') as app_cfg:
      CLIENT_ID = app_cfg.readline()
      CLIENT_SECRET = app_cfg.readline()
      ACCESS_TOKEN = app_cfg.readline().replace('\n', '')
  
  #################################################
  
  
  from boxsdk.network.default_network import DefaultNetwork
  from pprint import pformat
  
  
  
  class LoggingNetwork(DefaultNetwork):
      def request(self, method, url, access_token, **kwargs):
          """Base class override. Pretty-prints outgoing requests and incoming responses. """
          print('\x1b[36m{} {} {}\x1b[0m'.format(method, url, pformat(kwargs)))
          response = super(LoggingNetwork, self).request(
              method, url, access_token, **kwargs
          )
          if response.ok:
              print('\x1b[32m{}\x1b[0m'.format(response.content))
          else:
              print('\x1b[31m{}\n{}\n{}\x1b[0m'.format(
                  response.status_code,
                  response.headers,
                  pformat(response.content),
              ))
          return response
  
  
  ###########################################
  
  ##########
  
  # Create OAuth2 object. It's already authenticated, thanks to the developer token.
  oauth2 = OAuth2(CLIENT_ID, CLIENT_SECRET, access_token=ACCESS_TOKEN)
  
  # Create the authenticated client
  client = Client(oauth2, LoggingNetwork())
  
  #######################################################
  
  items = client.folder(folder_id='0').get_items(limit=100, offset=0)
  for item in items:
      with open('FileFromBox.xls', 'wb') as open_file:
          client.file(item.id).download_to(open_file)
          open_file.close()
  </code></pre>
  
  <p>I think I am successfully authenticated and got file_id.
  After excuting this script, files are created in home directory, but those files contain no data. I tried to do cat command, but no data show up. I'm sure files are placed in box.com. Could please someone tell me what is the wrong in this code?</p>