title: Opening file error: TypeError: coercing to Unicode: need string or buffer, list found
body: <p>I have the following code: Basically what I am doing, is looking for a .csv file, which could be in one of two places (or more depending)
  I have the two specific locations in a text file <code>(LocationsFile.txt).</code> </p>
  
  <p>Out of this I want only to get specific fields for the student: This is the  <code>SSID Field</code></p>
  
  <p>I have the following code, but the error it seems to give me is as follows:</p>
  
  <pre><code>    Tape Name130322
  ['\\\\....HIDDEN FOR Confidenciality .....StudentDB1_av.csv']
  Success:
  Exception in Tkinter callback
  Traceback (most recent call last):
    File "C:\Python27\lib\lib-tk\Tkinter.py", line 1410, in __call__
      return self.func(*args)
    File "C:\Users\Administrator\Desktop\John\Spreadsheet\Gui.py", line 291, in run
      findStudentData('130322','StudentDB1')
    File "C:\Users\Administrator\Desktop\John\Spreadsheet\Gui.py", line 62, in findStudentData
      with open(items) as f:
  TypeError: coercing to Unicode: need string or buffer, list found
  </code></pre>
  
  <p>Code that is being executed is as follows: - please do be considerate when replying, as I am a 'newbie' python programmer! </p>
  
  <pre><code>def findStudentData(student_name,course):
  student_name= student_name.lower()
  configfiles = []
  
  print "student_name" + student_name
  for path in MMinfo_paths:
      configfiles.append(glob.glob(path+"/" + course+"*"))
  
  for items in configfiles:
      print items
      print "Success:"
      heading = True
  
      with open(items) as f:
          content = f.read()
  
          if heading == True
              ssidCol = content.index('ssid')
              flagsCol = content.index('flags')
              nameCol = content.index('name')
              heading = False
              continue
  
  
  
          for item in rowData:
              if rowData.index(item) == nameCol:
                  print rowData
              else:
                  continue
  </code></pre>
  
  <p>Many thanks :-)</p>