Skip to content
Advertisement

Tag: memoryview

NameError: name ‘buffer’ is not defined

Python2 code: What is the python3 equivalent? I tried to replace buffer with memoryview() but than name error becomes a type error: TypeError: memoryview: a bytes-like object is required, not ‘str’. I’m pretty sure that this should be a string and not a byte. Can someone help me? Buffer function for python 3+ IS NOT THE ANSWER! Answer Adapting answers

Advertisement