liz-starfield / LizAgents

🌈LizAgents is a collection of intelligent agents, including 🦄Vision Agent, 🐷Memory Agent, 🐮CSV Agent, 🐳PDF Agent, 🐯Search Agent and 🐸Chat Agent. Powered by OpenAI, LangChain, Streamlit, Selenium and GPT-4V-Act.
https://liz-agents.streamlit.app
MIT License
6 stars 3 forks source link

ProxyError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): #1

Open HugoHunt opened 2 months ago

HugoHunt commented 2 months ago

can you help me solve this problem? ProxyError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /sentence-transformers/all-MiniLM-L6-v2/resolve/main/config.json (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1135)'))))"), '(Request ID: 7af6fbc9-4b8c-45f7-89e8-36e3e5c28ff1)')

HugoHunt commented 2 months ago

i am in china

NileZhou commented 2 months ago

You can solve it by using proxy like this (insert these lines in the head of file):

import os

os.environ['HTTP_PROXY'] = '<your local proxy server ip and port>'
os.environ['HTTPS_PROXY'] = '<your local proxy server ip and port>'

Or, if you have downloaded these files which huggingface required already, you can use these lines to prevent it connects to huggingface.co every time: (also inserted at begin of file)

import os
os.environ.setdefault("TRANSFORMERS_OFFLINE", "1")

Hope it can help you!