You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The csv342 version of DictReader cannot accept a list of CSV lines, though the built in version in both Python 2 and Python 3 can do so. If you're interested in accepting patches, I could submit one for this issue.
csv342 on python 2.7
>>> import csv342 as csv
>>> list(csv.DictReader(['a,b', '1,2']))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/lucaswiman/website/vendor/venv/lib/python2.7/site-packages/csv342.py", line 239, in next
return self.__next__()
File "/Users/lucaswiman/website/vendor/venv/lib/python2.7/site-packages/csv342.py", line 220, in __next__
if self.fieldnames is None:
File "/Users/lucaswiman/website/vendor/venv/lib/python2.7/site-packages/csv342.py", line 205, in fieldnames
self._set_fieldnames_from_first_row()
File "/Users/lucaswiman/website/vendor/venv/lib/python2.7/site-packages/csv342.py", line 199, in _set_fieldnames_from_first_row
self._fieldnames = next(self.reader)
File "/Users/lucaswiman/website/vendor/venv/lib/python2.7/site-packages/csv342.py", line 161, in next
return self.__next__()
File "/Users/lucaswiman/website/vendor/venv/lib/python2.7/site-packages/csv342.py", line 156, in __next__
row = self.reader.next()
File "/Users/lucaswiman/website/vendor/venv/lib/python2.7/site-packages/csv342.py", line 140, in next
return self.__next__()
File "/Users/lucaswiman/website/vendor/venv/lib/python2.7/site-packages/csv342.py", line 137, in __next__
return self._text_stream.next().encode('utf-8')
AttributeError: 'list' object has no attribute 'next'
The csv342 version of DictReader cannot accept a list of CSV lines, though the built in version in both Python 2 and Python 3 can do so. If you're interested in accepting patches, I could submit one for this issue.
csv342 on python 2.7
Python 3.4 (also works on 3.6)
The text was updated successfully, but these errors were encountered: