codefuse-ai/codefuse-chatbot

报错model_config.py[line:33] - ERROR: No module named 'zdatafront'

Closed this issue · 1 comments

Checked other resources

  • I searched the Codefuse documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in Codefuse-Repos rather than my code.
  • I added a very descriptive title to this issue.

System Info

Windows

Code Version

Latest Release

Description

启动对话服务后报错,我导入的大模型是Qwen2.5-Coder-1.5B-Instruct

Example Code

错误的位置在model_config.py

try:
    from zdatafront import client
    from zdatafront.client import ZDF_COMMON_QUERY_URL
    # zdatafront 提供的统一加密密钥
    client.aes_secret_key = os.environ.get("aes_secret_key")
    # zdatafront 分配的业务标记
    client.visit_domain = os.environ.get("visit_domain")
    client.visit_biz = os.environ.get("visit_biz")
    client.visit_biz_line = os.environ.get("visit_biz_line")
    OPENAI_API_BASE = ZDF_COMMON_QUERY_URL
except Exception as e:
    OPENAI_API_BASE = "https://api.openai.com/v1"
    logger.error(e)
    pass

Error Message and Stack Trace (if applicable)

2024-09-22 02:34:19,445 - model_config.py[line:33] - ERROR: No module named 'zdatafront'
2024-09-22 02:34:25.914 | ERROR | webui.utils:get:125 - [WinError 10061] 由于目标计算机积极拒绝,无法连接。
2024-09-22 02:34:28.206 | ERROR | webui.utils:get:125 - [WinError 10061] 由于目标计算机积极拒绝,无法连接。
2024-09-22 02:34:30.490 | ERROR | webui.utils:get:125 - [WinError 10061] 由于目标计算机积极拒绝,无法连接。
2024-09-22 02:34:30.492 | ERROR | webui.utils:_check_httpx_json_response:695 - 'NoneType' object has no attribute 'json'
<webui.utils.ApiRequest object at 0x000002ACF363EE20>
{'code': 500, 'msg': '无法连接API服务器,请确认已执行python server\api.py'}
2024-09-22 02:34:30.492 Uncaught app exception
Traceback (most recent call last):
File "E:\APP\anaconda3\envs\codefuse\lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling
result = func()
File "E:\APP\anaconda3\envs\codefuse\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 590, in code_to_exec
exec(code, module.dict)
File "E:\Code\PyCharm\codefuse-chatbot\examples\webui.py", line 92, in
pages[selected_page]"func"
File "E:\Code\PyCharm\codefuse-chatbot\examples\webui\dialogue.py", line 266, in dialogue_page
files = files["data"]
KeyError: 'data'

zdatafront不用关注,不影响使用。另外报错属于 sdfile_api.py 没正确启动,可以看下 ~/logs/sdfile_api.log的日志

chatbot属于前期demo。后面新版本ui和服务均直接在https://github.com/codefuse-ai/CodeFuse-muAgent透出,预计10.24有第一个版本。可以关注下