ascii' codec can't decode byte 0xc2 in position 4942: ordinal not in range(128)
Closed this issue · 5 comments
Description
Canbus adaptation code can be generated by using apollo Tools. Before converting the code, make sure that the DBC file is completed according to the above-mentioned DBC File requirements, and open the dbc file through gedit, save the data in UTF-8 format.
Version:Apollo6.0
Run the following command:
cd modules/tools/gen_vehicle_protocol
python gen.py ge3_conf.ymal
Report an error:
ascii' codec can't decode byte 0xc2 in position 4942: ordinal not in range(128)
I have solved the problem and need to modify the code:
Change open(dbc_file) to open(dbc_file,encoding="utf-8")
If the same error is reported, you can modify this method.
您好,这边我们也在进行新车的适配,这边遇到了一些问题,有些问题想请教您,方便的话能否留个联系方式,交流一下。
Closed due to inactivity. If the problem persists, pls feel free to reopen it or create a new one and refer to it.