-1

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?

via2
  • 9
  • 3

1 Answers1

0

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.

Ali Türkay Avci
  • 1,038
  • 12
  • 12