Skip to content
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

/index/build 报错 UnicodeDecodeError #38

Open
helix-song opened this issue Sep 10, 2024 · 8 comments
Open

/index/build 报错 UnicodeDecodeError #38

helix-song opened this issue Sep 10, 2024 · 8 comments

Comments

@helix-song
Copy link

项目初始化正常,连接 deepseek 模型,执行命令 /index/build 的时候,报错:

UnicodeDecodeError -  'utf-8' codec can't decode byte 0xff in position 4696: invalid start byte
@helix-song
Copy link
Author

helix-song commented Sep 12, 2024

补充一点输出信息:

2024-09-12 17:36:16.565 | INFO     | autocoder.auto_coder:load_include_files:69 - Loading include file: /project/actions/base/base.yml
2024-09-12 17:36:16.569 | WARNING  | autocoder.auto_coder:main:261 - Detecting error when connecting to ray cluster: 'Namespace' object has no attribute 'doc_command', try to connect to ray cluster without storage support.
2024-09-12 17:36:16,614 INFO worker.py:1598 -- Connecting to existing Ray cluster at address: 127.0.0.1:6379...
2024-09-12 17:36:16,614 INFO worker.py:1616 -- Calling ray.init() again after it has already been called.
2024-09-12 17:36:16.624 | INFO     | autocoder.index.for_command:index_command:37 - Beging to index source code in /project
An error occurred: UnicodeDecodeError - 'utf-8' codec can't decode byte 0xff in position 4696: invalid start byte

似乎是读取自己生成的 yml 配置文件时出错了。

@helix-song
Copy link
Author

操作系统:MAC 14.3.1

@helix-song
Copy link
Author

尝试了 auto-coder.chat --debug 启动,只是多了异常时调用栈,并没有更多的信息,主要是没有输出哪个文件有异常。

@helix-song
Copy link
Author

改了一点源码,可以输出有问题的文件了,但居然是 venv 下面的 site-packages 里的文件:

autocoder.pyproject:read_file_content:189 - UnicodeDecodeError on reading file <project>/venv/lib/python3.11/site-packages/joblib/test/test_func_inspect_special_encoding.py

@zjb1001
Copy link

zjb1001 commented Sep 23, 2024

追加一个案例:
环境:WSL2/Win11
报错信息:
2024-09-23 19:46:00.610 | INFO | autocoder.auto_coder:load_include_files:69 - Loading include file: /home/page/GitPlayground/AimRT/actions/base/base.yml
2024-09-23 19:46:00.612 | WARNING | autocoder.auto_coder:main:261 - Detecting error when connecting to ray cluster: 'Namespace' object has no attribute 'doc_command', try to connect to ray cluster without storage support.
2024-09-23 19:46:00,621 INFO worker.py:1598 -- Connecting to existing Ray cluster at address: 172.22.73.122:6379...
2024-09-23 19:46:00,621 INFO worker.py:1616 -- Calling ray.init() again after it has already been called.
An error occurred: UnicodeDecodeError - 'utf-8' codec can't decode byte 0x80 in position 6: invalid start byte

@mystery-pai
Copy link

追加一个案例: 环境:WSL2/Win11 报错信息: 2024-09-23 19:46:00.610 | INFO | autocoder.auto_coder:load_include_files:69 - Loading include file: /home/page/GitPlayground/AimRT/actions/base/base.yml 2024-09-23 19:46:00.612 | WARNING | autocoder.auto_coder:main:261 - Detecting error when connecting to ray cluster: 'Namespace' object has no attribute 'doc_command', try to connect to ray cluster without storage support. 2024-09-23 19:46:00,621 INFO worker.py:1598 -- Connecting to existing Ray cluster at address: 172.22.73.122:6379... 2024-09-23 19:46:00,621 INFO worker.py:1616 -- Calling ray.init() again after it has already been called. An error occurred: UnicodeDecodeError - 'utf-8' codec can't decode byte 0x80 in position 6: invalid start byte

遇到和你相同的问题,个人Mac电脑上可以用,公司的windows用不了

@zqc1661586344
Copy link

怎么解决的?

@helix-song
Copy link
Author

没解决。。后来去用 Cline 了。不过后来想,也许把虚拟环境(venv)从项目目录移出去能解决吧(因为报错的文件,是在 venv 里面)

怎么解决的?

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

No branches or pull requests

4 participants