成功解决UnicodeDecodeError: ‘utf-8‘ codec can‘t decode bytes in position 1022-1023: unexpected end of da

运行YOLO v7,遇到如下问题
成功解决UnicodeDecodeError: ‘utf-8‘ codec can‘t decode bytes in position 1022-1023: unexpected end of da_第1张图片
应该是中文的问题
程序顶部加上以下两段:

#!/usr/bin/env python
# coding=utf-8

解决了!

你可能感兴趣的:(深度学习,python)