GaiZhenbiao / ChuanhuChatGPT

GUI for ChatGPT API and many LLMs. Supports agents, file-based QA, GPT finetuning and query with web search. All with a neat UI.

Home Page:https://huggingface.co/spaces/JohnSmith9982/ChuanhuChatGPT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[本地部署]: 首次启动 TypeError: str expected, not NoneType

WILDADF opened this issue · comments

是否已存在现有反馈与解答?

  • 我确认没有已有issue或discussion,且已阅读常见问题

是否是一个代理配置相关的疑问?

  • 我确认这不是一个代理配置相关的疑问。

错误描述

首次启动
TypeError: str expected, not NoneType

复现操作

首次启动
TypeError: str expected, not NoneType

错误日志

C:\Users\User\Documents\ChuanhuChatGPT>python ChuanhuChatbot.py
2024-02-25 04:18:01,201 [WARNING] [webui_locale.py:24] Language file for zh_TW does not exist. Using English instead.
2024-02-25 04:18:01,203 [WARNING] [webui_locale.py:25] Available languages: en_US, extract_loca, ja_JP, ko_KR, ru_RU, sv_SE, vi_VN, zh_CN
Traceback (most recent call last):
  File "C:\Users\User\Documents\ChuanhuChatGPT\ChuanhuChatbot.py", line 8, in <module>
    from modules.models.models import get_model
  File "C:\Users\User\Documents\ChuanhuChatGPT\modules\models\models.py", line 9, in <module>
    from modules import config
  File "C:\Users\User\Documents\ChuanhuChatGPT\modules\config.py", line 117, in <module>
    os.environ["GOOGLE_GENAI_API_KEY"] = google_genai_api_key
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen os>", line 684, in __setitem__
  File "<frozen os>", line 744, in check_str
TypeError: str expected, not NoneType

运行环境

- OS: win10 22H2
- Browser: Chrome 121.0.6167.185 
- Gradio version: 3.43.2
- Python version: 3.11.8

补充说明

No response

复制一份 config_example.json,并将其重命名为 config.json就可以运行
这是正常的吗?
本地部署时,我跳过了3.填写项目配置.

这是一个bug,项目应该可以在没有config的情况下运行才对。我修一下。