Skip to content

Fixed the case where UnicodeDecodeError #863

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

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

Moonlight-YS
Copy link
Contributor

'gbk' codec can't decode byt…e 0x94 in position 353: illegal multibyte sequence

Describe the changes you have made:

Forces the specified yaml file to be read using the utf-8 file stream, avoiding encoding errors when the yaml package gets the information

Reference any relevant issues (e.g. "Fixes #000"):

Fixes #860

Pre-Submission Checklist (optional but appreciated):

  • I have included relevant documentation updates (stored in /docs)
  • I have read docs/CONTRIBUTING.md
  • I have read docs/ROADMAP.md

OS Tests (optional but appreciated):

  • [√ ] Tested on Windows
  • Tested on MacOS
  • Tested on Linux

…e 0x94 in position 353: illegal multibyte sequence
@Notnaton
Copy link
Collaborator

Notnaton commented Jan 3, 2024

We should do a quick search for other places containing with open(file) and add utf encoding.

I'm home from vacation in a few hours, will approve once I'm on my computer

@Moonlight-YS
Copy link
Contributor Author

We should do a quick search for other places containing with open(file) and add utf encoding.

I'm home from vacation in a few hours, will approve once I'm on my computer

Thank you very much for your project, after a period of use and testing, it seems that only the yaml file stream that reads the config has a non-utf encoding problem, but for the sake of robustness, you can specify the open file as utf, thank you for your work!

@KillianLucas
Copy link
Collaborator

Excellent work @Moonlight-YS. I don't have the keys / settings to trigger this error, so this is extremely helpful to patch— I would have never seen it. Merging!

@KillianLucas KillianLucas merged commit e3f0a9a into openinterpreter:main Jan 4, 2024
@2catycm
Copy link

2catycm commented Feb 15, 2025

遇到了一样的问题,根本跑不通教程,直接放弃这个项目了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

编码问题-encoding issue
4 participants