title: NameError: name 'argv' is not defined
body: <p>I am trying to make a Google API call and am getting an error with the beginning of the code found here:</p>
  
  <pre><code>import os
  
  import argparse
  import sys
  
  from apiclient import sample_tools
  from oauth2client import client
  
  # Declare command-line flags.
  argparser = argparse.ArgumentParser(add_help=False)
  argparser.add_argument(
      'profile_id', type=int,
      help='The ID of the profile to look up campaigns for')
  
  
  
    # Authenticate and construct service.
  service, flags = sample_tools.init(
      argv[1:], 'dfareporting', 'v2.1', __doc__, os.path.abspath(os.path.dirname("__file__")), parents=[argparser],
      scope=['https://www.googleapis.com/auth/dfareporting',
             'https://www.googleapis.com/auth/dfatrafficking'])
  
  if __name__ == '__main__':
    main(sys.argv)
  </code></pre>
  
  <p>However, the sample_tools.init function is not returning the service and flags object. I think I have isolated it to the argv argument a</p>
  
  <pre><code>NameError: name 'argv' is not defined
  </code></pre>
  
  <p>Any help would be much appreciated!!!</p>