I am trying to save the output from a module to a CSV file, and I got an error when I ran the following code, which is part of the module:
base_keys = ['path', 'rDATE', 'cDate', 'cik', 'risk', 'word_count'] outFile = open('c:\\Users\\ahn_133\\Desktop\\Python Project\\MinkAhn_completed2.csv','wb') dWriter = csv.DictWriter(outFile, fieldnames=base_keys) dWriter.writerow(headerDict)
Here is the error message (base_keys are the headers.)
return self.writer.writerow(self._dict_to_list(rowdict)) TypeError: 'str' does not support the buffer interface
I donβt even understand what an error message is. I am using Python 3.3 and Windows 7.
Thank you for your time.
source share