OpenBMB / RepoAgent

An LLM-powered repository agent designed to assist developers and teams in generating documentation and understanding repositories quickly.
Apache License 2.0
293 stars 45 forks source link

[bug]这个代码有几个人是能run起来的,好多bug #73

Open ForgetThatNight opened 1 month ago

ForgetThatNight commented 1 month ago

`2024-07-25 17:26:12.759 | ERROR | repo_agent.chat_with_repo.json_handler:read_json_file:17 - File not found: .project_doc_record/project_hierarchy.json Traceback (most recent call last):

File "/Users/Desktop/workspace/RepoAgent/repo_agent/main.py", line 310, in run_chat_with_repo() └ <function main at 0x7fef1231f880>

File "/Users/Desktop/workspace/RepoAgent/repo_agent/chat_with_repo/main.py", line 16, in main md_contents, meta_data = assistant.json_data.extract_data() │ │ └ <function JsonFileProcessor.extract_data at 0x7feefe17df30> │ └ <repo_agent.chat_with_repo.json_handler.JsonFileProcessor object at 0x7feefeaca110> └ <repo_agent.chat_with_repo.rag.RepoAssistant object at 0x7feefea91480>

File "/Users/Desktop/workspace/RepoAgent/repo_agent/chat_with_repo/json_handler.py", line 22, in extract_data json_data = self.read_json_file() │ └ <function JsonFileProcessor.read_json_file at 0x7feefe17dea0> └ <repo_agent.chat_with_repo.json_handler.JsonFileProcessor object at 0x7feefeaca110>

File "/Users/Desktop/workspace/RepoAgent/repo_agent/chat_with_repo/json_handler.py", line 13, in read_json_file with open(self.file_path, "r", encoding="utf-8") as file: │ └ PosixPath('.project_doc_record/project_hierarchy.json') └ <repo_agent.chat_with_repo.json_handler.JsonFileProcessor object at 0x7feefeaca110>

FileNotFoundError: [Errno 2] No such file or directory: '.project_doc_record/project_hierarchy.json'`

Traceback (most recent call last): File "/Users/anaconda3/envs/freqtrade/bin/repoagent", line 5, in <module> from repo_agent.main import cli File "/Users/anaconda3/envs/freqtrade/lib/python3.10/site-packages/repo_agent/main.py", line 12, in <module> from repo_agent.chat_with_repo import main as run_chat_with_repo File "/Users/anaconda3/envs/freqtrade/lib/python3.10/site-packages/repo_agent/chat_with_repo/__init__.py", line 3, in <module> from .main import main File "/Users/anaconda3/envs/freqtrade/lib/python3.10/site-packages/repo_agent/chat_with_repo/main.py", line 3, in <module> from repo_agent.settings import setting File "/Users/anaconda3/envs/freqtrade/lib/python3.10/site-packages/repo_agent/settings.py", line 1, in <module> from enum import StrEnum ImportError: cannot import name 'StrEnum' from 'enum' (/Users/anaconda3/envs/freqtrade/lib/python3.10/enum.py)

Umpire2018 commented 1 month ago

Please use python 3.11 instead. You are welcome to open a pull request to fix it.