text-generation-webui
text-generation-webui copied to clipboard
ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
Describe the bug
ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
Is there an existing issue for this?
- [X] I have searched the existing issues
Reproduction
ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
Screenshot
Logs
TypeError: replace() argument 1 must be str, not bytes
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ D:\text-generation-webui-main\server.py:255 in <module> │
│ │
│ 254 # Launch the web UI │
│ > 255 create_interface() │
│ 256 while True: │
│ │
│ D:\text-generation-webui-main\server.py:161 in create_interface │
│ │
│ 160 with OpenMonkeyPatch(): │
│ > 161 shared.gradio['interface'].launch( │
│ 162 max_threads=64, │
│ │
│ D:\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\blocks.py:2305 in launch │
│ │
│ 2304 ): │
│ > 2305 raise ValueError( │
│ 2306 "When localhost is not accessible, a shareable link must be created. Ple │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your
proxy settings to allow access to localhost.
System Info
Windows10
RTX 3050
i7-11800H
I think this is the same issue. https://github.com/oobabooga/text-generation-webui/issues/5975
If you use a proxy server in Windows, you may need to set HTTP_PROXY
, HTTPS_PROXY
and NO_PROXY
environment variables.
import os
from urllib.request import getproxies
proxies = getproxies()
os.environ["http_proxy"] = proxies["http"]
os.environ["https_proxy"] = proxies["https"]
os.environ["no_proxy"] = "localhost, 127.0.0.1/8, ::1"
If you use a proxy server in Windows, you may need to set
HTTP_PROXY
,HTTPS_PROXY
andNO_PROXY
environment variables.import os from urllib.request import getproxies proxies = getproxies() os.environ["http_proxy"] = proxies["http"] os.environ["https_proxy"] = proxies["https"] os.environ["no_proxy"] = "localhost, 127.0.0.1/8, ::1"
you are right