-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gbk error. How can I solve it? #1669
Comments
Hello @ZipYu, thank you for your interest in 🚀 YOLOv5! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available. For business inquiries or professional support requests please visit https://www.ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com. RequirementsPython 3.8 or later with all requirements.txt dependencies installed, including $ pip install -r requirements.txt EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit. |
Looks like your yaml file is encoding with gbk, use utf-8 instead. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I have the same problem, change to the source code format is also a problem.Have you solved the problem? |
@helloworldbyqiqi hello! Thank you for bringing up this issue. The error you are encountering seems to be related to the encoding format of your YAML file. It is recommended to use UTF-8 encoding instead of GBK or GB2312. Fortunately, the YOLOv5 repository supports UTF-8 encoding, which is the default encoding for most programming languages and text editors. You can change the encoding format of your YAML file by saving it with UTF-8 encoding. If you are still facing any issues after changing the encoding format, please provide more details about your problem, such as specific error messages or code snippets. This will help us in assisting you further. |
@glenn-jocher Thank you very much for your answer. My problem has been solved. As you said is the file encoding format problem, after the change of the problem the code can run normally! |
@helloworldbyqiqi you're welcome! I'm glad to hear that your issue has been resolved. If you have any further questions or need any assistance in the future, feel free to ask. The YOLOv5 community and the Ultralytics team are always here to help. Happy coding! |
Traceback (most recent call last):
File "train.py", line 504, in
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 70, in train
data_dict = yaml.load(f, Loader=yaml.FullLoader) # data dict
File "D:\Anaconda3\envs\pytorch-gpu\lib\site-packages\yaml_init_.py", line 112, in load
loader = Loader(stream)
File "D:\Anaconda3\envs\pytorch-gpu\lib\site-packages\yaml\loader.py", line 24, in init
Reader.init(self, stream)
File "D:\Anaconda3\envs\pytorch-gpu\lib\site-packages\yaml\reader.py", line 85, in init
self.determine_encoding()
File "D:\Anaconda3\envs\pytorch-gpu\lib\site-packages\yaml\reader.py", line 124, in determine_encoding
self.update_raw()
File "D:\Anaconda3\envs\pytorch-gpu\lib\site-packages\yaml\reader.py", line 178, in update_raw
data = self.stream.read(size)
UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 429: illegal multibyte sequence
The text was updated successfully, but these errors were encountered: