AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
140.55k stars 26.6k forks source link

[Bug]: "Expecting value: line 1 column 1 (char 0)" thrown, when I added "--listen" to my "COMMANDLINE_ARGS" #9132

Open KsAPOSTROPHE opened 1 year ago

KsAPOSTROPHE commented 1 year ago

Is there an existing issue for this?

What happened?

Hello, developers

I added --listen arg to my COMMANDLINE_ARGS, like "set COMMANDLINE_ARGS= --listen". which located at "webui-user.bat" file.

Then the error throw out. "Expecting value: line 1 column 1 (char 0)", here is the screenshot for this error: image

BTW, I created a new instance, and repeat the steps above, the error still reproduced.

[System]: windows 10

Please someone help.

Thank you for your patient reading.

Steps to reproduce the problem

  1. git clone the repo
  2. run
  3. set COMMANDLINE_ARGS= --listen at webui-user.bat
  4. rerun

What should have happened?

Can run normally and access the instance locally

Commit where the problem happens

3856ada5cc9ac4124e20ff311ce7aa77330845d9

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

COMMANDLINE_ARGS= --listen

List of extensions

No

Console logs

venv "H:\test\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Commit hash: 3856ada5cc9ac4124e20ff311ce7aa77330845d9
Installing requirements for Web UI
Launching Web UI with arguments: --api --listen
No module 'xformers'. Proceeding without it.
Loading weights [6ce0161689] from H:\test\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: H:\test\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (Doggettx).
Textual inversion embeddings loaded(0):
Model loaded in 3.7s (load weights from disk: 0.2s, create model: 0.4s, apply weights to model: 0.9s, apply half(): 0.8s, move model to device: 0.7s, load textual inversion embeddings: 0.8s).
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 12.0s (import torch: 1.1s, import gradio: 0.8s, import ldm: 0.4s, other imports: 0.7s, setup codeformer: 0.2s, load scripts: 0.6s, load SD checkpoint: 3.8s, create ui: 0.2s, gradio launch: 4.2s, scripts app_started_callback: 0.1s).

Additional information

No response

KeHcu commented 1 year ago

Share and ngrok similarly, the connection is being destroyed

FruiteePro commented 1 year ago

I got this problem too. I found a solution https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/9055#issuecomment-1485787648 , but it doesn't work for me.

KsAPOSTROPHE commented 1 year ago

Share and ngrok similarly, the connection is being destroyed

I noticed it just modified some styles, that might not work for me either.

Thank you for help as well.

KsAPOSTROPHE commented 1 year ago

Share and ngrok similarly, the connection is being destroyed

Sorry, Could you explain that more? Thank you

KeHcu commented 1 year ago

Share and ngrok similarly, the connection is being destroyed

Sorry, Could you explain that more? Thank you

yesterday everything worked fine, today I launched it in the cloud via --ngrok, opened it in the browser, errors got into the console, the connection was interrupted, I tried to launch share the same thing happens

KsAPOSTROPHE commented 1 year ago

Share and ngrok similarly, the connection is being destroyed

Sorry, Could you explain that more? Thank you

yesterday everything worked fine, today I launched it in the cloud via --ngrok, opened it in the browser, errors got into the console, the connection was interrupted, I tried to launch share the same thing happens

well, look weird too.

I plan to migrate to a docker application.

GreatLikeGame commented 1 year ago

I got this problem too. I found a solution #9055 (comment) , but it doesn't work for me.

i don't even find the user.css ,is it in this project?

FruiteePro commented 1 year ago

I got this problem too. I found a solution #9055 (comment) , but it doesn't work for me.

i don't even find the user.css ,is it in this project?

Another comment said you can add these words at the bottom of style.css.

I solved the issue by rolling back the Git commit to the version from March 14th.

aleimu commented 1 year ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>
wanghao-cst commented 1 year ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

It works, Thanks.

KsAPOSTROPHE commented 1 year ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

OK, it must be the Chinese characteristics issue, lol

xam0482 commented 1 year ago

No proxy service is used Parameters are used --no-gradio-queue . Server return {"active":false,"queued":true,"completed":false,"progress":null,"eta":null,"live_preview":null,"id_live_preview":-1,"textinfo":"In queue..."} Image output display "In queue..." It just happens less often

xam0482 commented 1 year ago

I've upgraded gradio to 3.24 and turned off --api(because there's an error and can't reference decode_base64_to_file The new version uses decode_base64_to_image).

Seems to have improved

At least the first picture trained by embedding will be generated correctly

SuperPhant commented 1 year ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

Great! How did you find that?

Jacoboob commented 1 year ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

sorry I don't understand --no-gradio-queue, what does it mean?

Jacoboob commented 1 year ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

sorry I don't understand --no-gradio-queue, what does it mean?

UriahKong commented 1 year ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

sorry I don't understand --no-gradio-queue, what does it mean?

I don't know either .bro you're Chinese right .same problem happened to me and I was wondering how the hell to add these strings of code to Python

Rosanguis commented 1 year ago

https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/9132#issuecomment-1504714740

just add set COMMANDLINE_ARGS=--no-gradio-queue in webui.bat

huaxiangtt commented 1 year ago

set COMMANDLINE_ARGS=--no-gradio-queue

正解,已经解决了,添加这个以后能开代理,不会报错了

Stream-ljw commented 1 year ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

anyone could explain why network proxy impacts the normal function???

odotq commented 1 year ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

thx!!

bitfishxyz commented 1 year ago
./webui.sh --no-gradio-queue

works for me

kidGuo commented 1 year ago

set COMMANDLINE_ARGS=--no-gradio-queue

正解,已经解决了,添加这个以后能开代理,不会报错了

在webui.bat中添加了set COMMANDLINE_ARGS=--no-gradio-queue 之后还做了什么吗?

CiciLyn commented 1 year ago

I love u guys!!!!!!!!! It finally works!!!!!!!!!!!! click 'edit' of the .bat file, and add the line --no-gradio-queue after set COMMANDLINE_ARGS=

you guys are my angels!!

if not working, re-start your computer might be a good choice!!( my own experience)

ihmily commented 11 months ago

I am aware of this issue. It seems to occur when the network proxy is turned on, resulting in an error like "Expecting value: line 1 column 1". The problem doesn't occur when the proxy is turned off.

However, you can prevent this error even when the proxy is on by setting COMMANDLINE_ARGS= --no-gradio-queue in both webui-user.bat and webui-user.bat. This way, you will not get this error even when the proxy is enabled.

Metashama commented 11 months ago

I am aware of this issue. It seems to occur when the network proxy is turned on, resulting in an error like "Expecting value: line 1 column 1". The problem doesn't occur when the proxy is turned off.

However, you can prevent this error even when the proxy is on by setting COMMANDLINE_ARGS= --no-gradio-queue in both webui-user.bat and webui-user.bat. This way, you will not get this error even when the proxy is enabled.

Hello ! how to make it on macOS ?

auto7359896 commented 10 months ago

1

Yes,Is work!

Totoro-jc commented 10 months ago

设置 COMMANDLINE_ARGS=--no-gradio-queue

正解,已经解决了,添加这个以后能开代理,就不会报错了

你好,我是ubuntu搭建的,怎么写啊?

ilxy2 commented 9 months ago

#9132 (comment)

just add set COMMANDLINE_ARGS=--no-gradio-queue in webui.bat

hi bro,there'r two webui-user.bat files,one of 'em's 3kb ,another one 's 1kb,which one i should edit? plz thx very much ![Uploading Screenshot4stablediffusionbugerorline0.png…]()

solstice-gao commented 9 months ago

--no-gradio-queue

This works for me, thank you.

Ricecr commented 9 months ago

设置 COMMANDLINE_ARGS=--no-gradio-queue

正解,已经解决了,添加这个以后能开代理,就不会报错了

你好,我是ubuntu搭建的,怎么写啊?

just add export COMMANDLINE_ARGS="--no-gradio-queue" in webui-user.sh at 13 row.

ZongerX commented 8 months ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

Thanks! It solve my problem!

Macroeye commented 7 months ago

#9132 (comment) #9132 (评论)

just add set COMMANDLINE_ARGS=--no-gradio-queue in webui.bat只需在webui.bat中添加 set COMMANDLINE_ARGS=--no-gradio-queue I also have this problem, it only works if I manage the crash agent and restart the UI。Adding “--no-gradio-queue” to “webui-user.bat” cannot solve this problem

christopherquenneville commented 6 months ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

I love you man :)

supremegordon commented 5 months ago

I found the reason because the network proxy software was turned on, turning off the shadowsocks will work fine, or use --no-gradio-queue

<html>
<head>
 <title>500 Internal Privoxy Error</title>
 <link rel="shortcut icon" href="http://config.privoxy.org/error-favicon.ico" type="image/x-icon"></head>
<body>
<h1>500 Internal Privoxy Error</h1>
<p>Privoxy encountered an error while processing your request:</p>
<p><b>Could not load template file <code>no-server-data</code> or one of its included components.</b></p>
<p>Please contact your proxy administrator.</p>
<p>If you are the proxy administrator, please put the required file(s)in the <code><i>(confdir)</i>/templates</code> directory.  The location of the <code><i>(confdir)</i></code> directory is specified in the main Privoxy <code>config</code> file.  (It's typically the Privoxy install directory).</p>
</body>
</html>

i could not launch Webui after adding "-no-gradio-queue", in cmd, it shows that:

Screenshot 2024-04-11 at 2 43 13 PM
ihmily commented 5 months ago

@supremegordon I think you need turn off the proxy, your network have some trouble.

supremegordon commented 5 months ago

@supremegordon I think you need turn off the proxy, your network have some trouble.

i have already turned off the proxy and re-try, but did not work

ihmily commented 5 months ago

@supremegordon I think you need turn off the proxy, your network have some trouble.

i have already turned off the proxy and re-try, but did not work

turned off the proxy and not use --no-gradio-queue , it also doesn't work ? good luck!

supremegordon commented 5 months ago

@supremegordon I think you need turn off the proxy, your network have some trouble.

i have already turned off the proxy and re-try, but did not work

turned off the proxy and not use --no-gradio-queue , it also doesn't work ? good luck!

Yes, I tried to remove --no-gradio-queue and launch webui, it worked. but for some reason i need to use proxy to ensure some settings work properly, so im looking for a solution for using webui with proxy. still, thanks for your reply!!

davoodice commented 4 months ago

connect with 127.0.0.1 instead of 0.0.0.0