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 eric.smith
Recipients eric.smith, sahsariga111
Date 2021-09-02.20:28:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630614506.81.0.466924747883.issue45087@roundup.psfhosted.org>
In-reply-to
Content
This is working as designed. The error is telling you that the argument to bytes.split() must be a string:

>>> b''.split(',')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: a bytes-like object is required, not 'str'

>>> b''.split(b',')
[b'']

Same for str.split():

>>> ''.split(b',')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: must be str or None, not bytes

>>> ''.split(',')
['']
History
Date User Action Args
2021-09-02 20:28:26eric.smithsetrecipients: + eric.smith, sahsariga111
2021-09-02 20:28:26eric.smithsetmessageid: <1630614506.81.0.466924747883.issue45087@roundup.psfhosted.org>
2021-09-02 20:28:26eric.smithlinkissue45087 messages
2021-09-02 20:28:26eric.smithcreate