Using the Box API:

print(source_file.content())


returns


b'First Name,Last Name,Email Address,Company,Position,Connected
On\nPeter,van

(and more data, not pasted here)


Trying to read it via:

with io.TextIOWrapper(source_file.content(), encoding='utf-8') as text_file:

reader = csv.DictReader(text_file)

for row in reader:

print(row)


Getting this error:

Traceback (most recent call last):
  File "/home/jason/my_box.py", line 278, in <module>
    with io.TextIOWrapper(source_file.content(), encoding='utf-8') as
text_file:
AttributeError: 'bytes' object has no attribute 'readable'
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to