title: ValueError: Invalid file path or buffer object type: <class 'tuple'>
body: <p>im a beginner with python ad try to semiautomate the import to YNAB.</p>
  
  <p>It works if i use "askopenfilename" and do each csv seperated, but i couldnt get it to work with askopenfilenames and inside a for item in loop.</p>
  
  <p>Then i get the following error message: 
  ValueError: Invalid file path or buffer object type: </p>
  
  <p>Enclosed the python Code:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  from tkinter import filedialog
  from tkinter import *
  root = Tk()
  root.filenames = filedialog.askopenfilenames(initialdir="C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/", title="Select file",
                                             filetypes=(("csv files", "*.csv"), ("all files", "*.*")))
  print(root.filenames)
  for item in root.filenames:
      print(item)
  from pandas.core.tools.numeric import to_numeric
  df = pd.read_csv(root.filenames, sep=';', usecols=(0, 1, 2, 3, 4),
                   encoding='utf-8', decimal=',')
  df.columns = ['Date', 'Payee', 'Verwendungszweck', 'Buchungstext', 'Betrag']
  df['Memo'] = df[['Buchungstext', 'Verwendungszweck']].apply(lambda x: ' -- '.join(x), axis=1)
  Betrag = df.Betrag.astype(int)
  df['Inflow'] = np.where(df.Betrag &gt; 0, df.Betrag, "")
  df['Outflow'] = np.where(df.Betrag &lt; 0, df.Betrag * (-1), "")
  path = (root.filenames.replace('Download_Finanzblick', 'Converted_YNAB')[:-4] + '-converted.csv')
  print(path)
  df.to_csv(path, sep=';', index=False,
            columns=['Date', 'Payee', 'Memo', 'Inflow', 'Outflow'], decimal='.')
  next(item)
  </code></pre>
  
  <p>and the Error Message:</p>
  
  <blockquote>
    <p>"C:\Program Files (x86)\Microsoft Visual
    Studio\Shared\Anaconda3_64\python.exe"
    "C:/Users/dangeph/Repository/Finanzblick YNAB/Testfile.py"
    ('C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/Amazon
    - Kopie.csv', 'C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/Amazon
    - Kopie-converted.csv', 'C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/Amazon.csv',
    'C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/Amazon-converted.csv',
    'C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/DB.csv',
    'C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/DiBA.csv',
    'C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/DKB.csv',
    'C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/DKB-Visa.csv',
    'C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/Paypal.csv',
    'C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/VB.csv')
    C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/Amazon
    - Kopie.csv C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/Amazon
    - Kopie-converted.csv C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/Amazon.csv
    C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/Amazon-converted.csv
    C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/DB.csv
    C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/DiBA.csv
    C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/DKB.csv
    C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/DKB-Visa.csv
    C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/Paypal.csv
    C:/Users/dangeph/Desktop/Favoriten/Privat/YNAB/Download_Finanzblick/2019_YY/VB.csv
    Traceback (most recent call last):   File
    "C:/Users/dangeph/Repository/Finanzblick YNAB/Testfile.py", line 21,
    in 
        encoding='utf-8', decimal=',')   File "C:\Program Files (x86)\Microsoft Visual
    Studio\Shared\Anaconda3_64\lib\site-packages\pandas\io\parsers.py",
    line 678, in parser_f
        return _read(filepath_or_buffer, kwds)   File "C:\Program Files (x86)\Microsoft Visual
    Studio\Shared\Anaconda3_64\lib\site-packages\pandas\io\parsers.py",
    line 424, in _read
        filepath_or_buffer, encoding, compression)   File "C:\Program Files (x86)\Microsoft Visual
    Studio\Shared\Anaconda3_64\lib\site-packages\pandas\io\common.py",
    line 218, in get_filepath_or_buffer
        raise ValueError(msg.format(_type=type(filepath_or_buffer))) ValueError: Invalid file path or buffer object type: </p>
    
    <p>Process finished with exit code 1</p>
  </blockquote>