This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka, sidhant
Date 2020-05-25.07:43:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590392637.94.0.37238962715.issue40762@roundup.psfhosted.org>
In-reply-to
Content
According to the documentation (https://docs.python.org/3/library/csv.html#writer-objects):

"""
A row must be an iterable of strings or numbers for Writer objects and a dictionary mapping fieldnames to strings or numbers (by passing them through str() first) for DictWriter objects.
"""

Byte object is neither string nor number. Passing it through str() gives your what you get.

Run Python with option -b or -bb to catch such kind of errors.
History
Date User Action Args
2020-05-25 07:43:57serhiy.storchakasetrecipients: + serhiy.storchaka, sidhant
2020-05-25 07:43:57serhiy.storchakasetmessageid: <1590392637.94.0.37238962715.issue40762@roundup.psfhosted.org>
2020-05-25 07:43:57serhiy.storchakalinkissue40762 messages
2020-05-25 07:43:57serhiy.storchakacreate