I am trying to return values from map function but instead it gives me the memory address. I tried using list, but then it gives me an error stating str object doesn't have an attribute decode. Is there a way out?
The first problem you mentioned is probably because you are accessing an objects name rather than applying a method.
But for this error Error: AttributeError: 'str' object has no attribute 'decode'
This error is already answered in here 'str' object has no attribute 'decode'. Python 3 error?
As it said here you are trying to decode an object that is already decoded. You have a str, there is no need to decode from UTF-8 anymore. If you remove the .decode() method from your chain it will be ok.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.