Closed Kamhamea closed 3 years ago
Sorry return bytes(x, encoding='utf8')
@Kamhamea Hi, do you have a example of how to implement this? I'm reading the documentation but i don't get it. If you can give me you telegram or discord?
This line is just a remnant of Py2 code that nobody noticed yet. It has to be translated into Py3. See here.
This function is only called if you want to store a string in a BinaryField in django which rarely happens.
Sorry I just noticed that the file namis not correctly displayed in my first notice. It is about this file line 123.
This function is only called if you want to store a string in a BinaryField in django which rarely happens.
You can not store text in binary field. You need to convert text into binary with txt.encode()
.
MySQLdb/__init__.py
Line 122-123
With "return bytes(x)" an exception is created
Bye