Aug-12-2017, 09:38 AM
Somewhere in your code, list object is passed instead of a string. Try an IDE to debug.
eg-
Instead you have to pass the string contained in the list.
eg-
>>> mylist = ['mystring'] >>> mylist.encode('utf-8')You'll get-
Error:Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'list' object has no attribute 'encode'
Instead you have to pass the string contained in the list.
>>> mylist[0].encode('utf-8') // first element of List
Output:b'mystring'