Attributeerror: ‘bytes’ object has no attribute’ encode ‘

When training the model, the following error is reported:
attributeerror: ‘bytes’ object has no attribute’ encode ‘
solution: click error report to enter the corresponding error report document, and change encode to decode.
This is because in python3, the encoding distinguishes between string and binary https://www.jianshu.com/p/a4cf632d97f1

Read More: