title: IOError: No such file or directory:
body: <pre><code> # pick up the file which needs to be processed
      current_file = file_names[0]
      print "Processing current file: " + current_file
  
      key = bucket.get_key(current_file)
      print "Processing key: " + str(key)
      key.get_contents_to_filename(working_dir + "test_stats_temp.dat")
      print "Current directory: ",outputdir
      print "File to process:",current_file
  </code></pre>
  
  <p>Processing test output for: ds=2013-08-27</p>
  
  <p>Processing current file: output/test_count_day/ds=2013-08-27/task_201308270934_0003_r_000000</p>
  
  <p>Processing key: Key: hadoop.test.com,output/test_count_day/ds=2013-08-27/task_201308270934_0003_r_000000</p>
  
  <pre><code>Traceback (most recent call last):
        File "queue_consumer.py", line 493, in &lt;module&gt;
          test_process.load_test_cnv_stats_daily(datestring,working_dir,mysqlconn,s3_conn,test_output_bucket,test_output)
        File "/home/sbr/aaa/test_process.py", line 46, in load_test_cnv_stats_daily
          key.get_contents_to_filename(working_dir + "test_stats_temp.dat")
        File "/usr/lib/python2.7/dist-packages/boto/s3/key.py", line 1275, in get_contents_to_filename
          fp = open(filename, 'wb')
      IOError: [Errno 2] No such file or directory: '/home/sbr/aaa/test_stats_temp.dat'
  </code></pre>
  
  <p>I got this error, when I fetched data to DB from S3 output. I'm confused here. How to handle this issue?</p>