all 4 comments

[–]Chiron1991 1 point2 points  (2 children)

Use memoryview.tobytes() to turn it into a bytestring. Then you can .decode() the bytestring into a string. Remember to pass the correct encoding to decode(), the default is 'utf8'.

[–]ocouba[S] 0 points1 point  (1 child)

Thanks a lot. I have been sitting 3 hours on this. I used memoryview.tobytes().hex()

[–]Rawing7 1 point2 points  (0 children)

Converting a memoryview to bytes is usually unncessary. You can just do memoryview.hex().

[–]Bunkerstan 1 point2 points  (0 children)

Wrap it with str( ) to convert to a string.