yolo训练时遇到GBK编码问题
启动训练具体信息如下:
comet upload E:\python\yolov9-main.cometml-runs\e0c17dd22058467f98cf447d5cc45bf5.zip
COMET INFO: Using 'D:\pycharmProject\yolov5-master-6.2\.cometml-runs' path as offline directory. Pass 'offline_directory' parameter into constructor or set the 'COMET_OFFLINE_DIRECTORY' environment variable to manually choose where to store offline experiment archives.
COMET WARNING: Native output logging mode is not available, falling back to basic output logging
Traceback (most recent call last):
File "D:\pycharmProject\yolov5-master-6.2old\train.py", line 630, in
main(opt)
File "D:\pycharmProject\yolov5-master-6.2old\train.py", line 526, in main
train(opt.hyp, opt, device, callbacks)
File "D:\pycharmProject\yolov5-master-6.2old\train.py", line 94, in train
loggers = Loggers(save_dir, weights, opt, hyp, LOGGER) # loggers instance
File "D:\pycharmProject\yolov5-master-6.2old\utils\loggers_init _.py", line 132, in init
self.comet_logger = CometLogger(self.opt, self.hyp)
File "D:\pycharmProject\yolov5-master-6.2old\utils\loggers\comet_init _.py", line 97, in init
self.data_dict = self.check_dataset(self.opt.data)
File "D:\pycharmProject\yolov5-master-6.2old\utils\loggers\comet_init _.py", line 232, in check_dataset
data_config = yaml.safe_load(f)
File "D:\ProgramData\Anaconda3\lib\site-packages\yaml_init _.py", line 125, in safe_load
return load(stream, SafeLoader)
File "D:\ProgramData\Anaconda3\lib\site-packages\yaml_init _.py", line 79, in load
loader = Loader(stream)
File "D:\ProgramData\Anaconda3\lib\site-packages\yaml\loader.py", line 34, in init
Reader.init (self, stream)
File "D:\ProgramData\Anaconda3\lib\site-packages\yaml\reader.py", line 85, in init
self.determine_encoding()
File "D:\ProgramData\Anaconda3\lib\site-packages\yaml\reader.py", line 124, in determine_encoding
self.update_raw()
File "D:\ProgramData\Anaconda3\lib\site-packages\yaml\reader.py", line 179, in update_raw
data = self.stream.read(size)
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 233: illegal multibyte sequence
<_io.TextIOWrapper name='data\coco128.yaml' mode='r' encoding='cp936'> ---------------------
COMET INFO: Couldn't find a Git repository in 'D:\pycharmProject\yolov5-master-6.2old' nor in any parent directory. Set COMET_GIT_DIRECTORY
if your Git Repository is elsewhere.
COMET WARNING: Unknown error exporting current conda environment
COMET INFO: ---------------------------------------------------------------------------------------
COMET INFO: Comet.ml OfflineExperiment Summary
COMET INFO: ---------------------------------------------------------------------------------------
COMET INFO: Data:
COMET INFO: display_summary_level : 1
COMET INFO: url : [OfflineExperiment will get URL after upload]
COMET INFO: Others:
COMET INFO: offline_experiment : True
COMET INFO: Uploads:
COMET INFO: conda-info : 1
COMET INFO: conda-specification : 1
COMET INFO: environment details : 1
COMET INFO: installed packages : 1
COMET INFO:
COMET WARNING: Experiment Name is generated at upload time for Offline Experiments unless set explicitly with Experiment.set_name
COMET WARNING: To get all data logged automatically, import comet_ml before the following modules: tensorboard, torch.
COMET INFO: Still saving offline stats to messages file before program termination (may take up to 120 seconds)
COMET INFO: Starting saving the offline archive
COMET INFO: To upload this offline experiment, run:
comet upload D:\pycharmProject\yolov5-master-6.2.cometml-runs\bf6f678f442649758c6ec09340cd9b34.zip
解决方法
bash
pip uninstall comet-ml
删运行命令卸载掉这个包后可以正常运行
参考文章https://blog.csdn.net/shuangshuangboole/article/details/131420080