I'm having trouble wrapping my brain around this error. It's really basic, but it seems to say the opposite of what is true.
>>> x=b'hi'
>>> urllib.parse.unquote(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/parse.py", line 609, in unquote
if '%' not in string:
TypeError: a bytes-like object is required, not 'str'
I've passed the code a bytes object, I would hope that's bytes-like enough. urllib.parse.unquote() seems to only work with a str object.
So why would it generate an error saying it needs a bytes-like object?