title: Weird "File Format not Supported" error for a CSV file (under a new event) when ingesting
body: <p>I just finished successfully testing file ingestion (dropping a CSV file on S3 bucket and extracting the data into a dynamo table) for a new event that I added, In order to
  perform this I had to:</p>
  <p><strong>1)</strong> Create the following new <strong>SMB</strong> event filter on S3 bucket dev-caa-cxx-ci2 under Properties -&gt;  Event notifications:</p>
  <ul>
  <li>data/landing/vendor/SMB/customerlink/sftp/leads/new/</li>
  </ul>
  <p><strong>2)</strong> Next I added the following environment variables for my Lambada  code to use:</p>
  <ul>
  <li><p>data/landing/vendor/SMB/customerlink/sftp/leads/processed/ (i.e. CSV_PROCESSED_SMB variable)</p>
  </li>
  <li><p>data/landing/vendor/SMB/customerlink/sftp/leads/error/  (i.e. CSV_ERROR_FOLDER_SMB variable)</p>
  </li>
  <li><p>data/landing/vendor/SMB/customerlink/sftp/leads/new// (i.e. CSV_NEW_FOLDER_SMB variable)</p>
  </li>
  </ul>
  <p><strong>3)</strong> Next, I updated the S3 – Dynamo Lambda to add the environment variables to the  function that loads the extracted file data into a vendor sftp in the dynamo table.</p>
  <p><strong>The file ingestion for development worked well using the previous setup for that dev-caa-cxx-ci2  bucket.</strong></p>
  <p>However, I did the same process setup for  S3 bucket <strong>test-caa-cxx-ci2</strong>  but I get the following error:</p>
  <p><strong>File Format not Supported for data/landing/vendor/SMB/customerlink/sftp/leads/new/CL_Ex__Customers_Veronica_Test.csv</strong></p>
  <p>Based on the setup between the 2 buckets and their environment variables and events, everything is identical. <em>TThe files are CSV files and they've always ingested in the past</em></p>
  <p><strong>Note</strong>: for the other ingestions on bucket <strong>test-caa-cxx-ci2</strong> which did not use the new <strong>SMB</strong> event , all the files had ingested OK and were successfully processed.
  Here's a snippet of the code.  The Code appears to die at the first else-if statement - the previous print statement before the IF statement prints out but nothing afterward (it should print that <em><strong>'in SMB parse_csv'</strong></em> statement:</p>
  <pre><code>print(os.environ['CSV_NEW_FOLDER'])
      if os.environ['CSV_NEW_FOLDER'] in event['file_path']:
          print('in Customer Link parse_csv')
          parse_csv_func = parse_customerlink(event, obj)
              #Checks if parse_csv return empty dictionary
          if parse_csv_func:
              parse_flag = True
              new_folder_path = os.environ['CSV_NEW_FOLDER']
              processed_folder_path = os.environ['CSV_PROCESSED_FOLDER']
      elif os.environ['CSV_NEW_FOLDER_SMB'] in event['file_path']:
          print('in SMB parse_csv')
          parse_csv_func =parse_customerlink_smb(event, obj)
              #Checks if parse_csv return empty dictionary
          if parse_csv_func:
              parse_flag = True
              new_folder_path = os.environ['CSV_NEW_FOLDER_SMB']
              processed_folder_path = os.environ['CSV_PROCESSED_FOLDER_SMB']
  </code></pre>
  <p>Thanks.</p>