Comment 5 for bug 1799746

Revision history for this message
Corey Bryant (corey.bryant) wrote : Re: when uploading file as secret: TypeError: a bytes-like object is required, not 'str'

Here's a small test that seems to confirm this is limited to py3:

$ python3
Python 3.6.7rc1 (default, Sep 27 2018, 09:51:25)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import binascii
>>> binascii.hexlify('string')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: a bytes-like object is required, not 'str'
>>> quit()

$ python2
Python 2.7.15+ (default, Oct 2 2018, 22:12:08)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import binascii
>>> binascii.hexlify('string')
'737472696e67'
>>>