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

an unexpected keyword argument 'proxy_ssl_context' TypeError: 'NoneType' object is not iterable #2032

Closed
fengyunzaidushi opened this issue Nov 13, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@fengyunzaidushi
Copy link
Collaborator

fengyunzaidushi commented Nov 13, 2023

问题描述 / Problem Description
还是代理相关的问题

复现问题的步骤

  1. 执行 '...' / python startup.py -a

预期的结果 / Expected Result
描述应该出现的结果 / Describe the expected result.

实际结果 / Actual Result
描述实际发生的结果 / Describe the actual result.

{'base_url': 'http://127.0.0.1:7861', 'timeout': 300.0, 'proxies': {'all://127.0.0.1': None, 'all://localhost': None, 'http://127.0.0.1': None, 'http://': 'http://127.0.0.1:7890', 'https://': 'http://127.0.0.1:7890', 'all://': None}}
2023-11-13 10:57:13,695 - utils.py[line:94] - ERROR: TypeError: error when post /llm_model/list_running_models: __init__() got an unexpected keyword argument 'proxy_ssl_context'
2023-11-13 10:57:13.696 Uncaught app exception
Traceback (most recent call last):
  File "/opt/miniconda3/envs/py39lang/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 541, in _run_script
    exec(code, module.__dict__)
  File "/mnt/sda/github/10yue/langchain-ChatGLM/webui.py", line 64, in <module>
    pages[selected_page]["func"](api=api, is_lite=is_lite)
  File "/mnt/sda/github/10yue/langchain-ChatGLM/webui_pages/dialogue/dialogue.py", line 83, in dialogue_page
    running_models = list(api.list_running_models())
TypeError: 'NoneType' object is not iterable

image

环境信息 / Environment Information

  • langchain-ChatGLM 版本/commit 号:0.0.335
  • 是否使用 Docker 部署:否
  • 使用的模型: ChatGLM2-6B
  • 使用的 Embedding 模型:m3e-base
  • 使用的向量库类型: faiss
  • 操作系统及版本 : ubuntu 22.04
  • Python 版本 / Python version: 3.9.17
  • 其他相关环境信息 / Other relevant environment information:

附加信息 / Additional Information
本地文件 /etc/profile 设置了代理:
1.

export http_proxy="http://127.0.0.1:7890"
export https_proxy="http://127.0.0.1:7890"

ubuntu系统网络如下:
image

  1. clash软件是打开状态,开启了rule模式。

ps:上一个版本,这种配置没有问题。

@fengyunzaidushi fengyunzaidushi added the bug Something isn't working label Nov 13, 2023
@IgnoranceSmile
Copy link

我也是,刚刚遇到这个问题

@fengyunzaidushi
Copy link
Collaborator Author

server/utils.py
# 构造Client
kwargs.update(timeout=timeout, proxies=default_proxies)
print(kwargs)
# 这里 的结果我本地是:
#{'base_url': 'http://127.0.0.1:7861', 'timeout': 300.0, 'proxies': {'all://127.0.0.1': None, 'all://localhost': None, 'http://127.0.0.1': None, 'http://': 'http://127.0.0.1:7890', 'https://': 'http://127.0.0.1:7890', 'all://': None}}

@fengyunzaidushi
Copy link
Collaborator Author

pip install httpx==0.25.0 解决了,原来版本是httpx==0.25.1

@ztfoolish
Copy link

pip install httpx==0.25.0 解决了,原来版本是httpx==0.25.1

大佬你好,为啥我按你的方法做了依然不行啊😭(pip install httpx==0.25.0)
我是在云服务器上跑的,本地ssh连接上去看的。本地开了代理(应该不影响吧?)
telegram-cloud-photo-size-5-6242220350800771243-y

@mountain1275
Copy link

pip install httpx==0.25.0 解决了,原来版本是httpx==0.25.1

大佬你好,为啥我按你的方法做了依然不行啊😭(pip install httpx==0.25.0) 我是在云服务器上跑的,本地ssh连接上去看的。本地开了代理(应该不影响吧?) telegram-cloud-photo-size-5-6242220350800771243-y

和你的报错一毛一样

@fengyunzaidushi
Copy link
Collaborator Author

后面还是有问题。我最后是重新创造环境,重新安装解决的。

@mension
Copy link

mension commented Dec 28, 2023

openai 依赖的httpx 是0.25.2 openai-python requirements

@AIfengstudy
Copy link

同样是这个问题!!!!

@zRzRzRzRzRzRzR
Copy link
Collaborator

现在还有这个问题吗

@zRzRzRzRzRzRzR zRzRzRzRzRzRzR self-assigned this Jan 13, 2024
@AIfengstudy
Copy link

今天刚装了一遍还是有这个问题 我按照下面方法回退pip install httpx==0.25.1,就不报错了;还有就是,如果不按python startup.py -a换成只启动webui的命令,不会有问题

pip install httpx==0.25.0 解决了,原来版本是httpx==0.25.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants