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

[Bug]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #8836

Closed
1 task done
tenabraex opened this issue Mar 23, 2023 · 9 comments
Closed
1 task done
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@tenabraex
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

a1111 was working fine, was generating images, it froze... on starting it again I get this, can't seem to find a solution (i've tried deleting cache.json)

i notice theres also a new

Installing requirements for Web UI
Expecting value: line 1 column 1 (char 0)

at the start of my console log

there seem to be some versions of this in the issues but none have functional solutions

Steps to reproduce the problem

start webui-user.bat
error occurs

What should have happened?

should start

Commit where the problem happens

a9fed7c

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

--autolaunch --disable-safe-unpickle --ckpt-dir 'E:\StableDiffusionData\models\Stable-diffusion' --gfpgan-models-path 'E:\StableDiffusionData\models\GFPGAN' --codeformer-models-path 'E:\StableDiffusionData\models\Codeformer' --esrgan-models-path 'E:\StableDiffusionData\models\ESRGAN' --embeddings-dir 'E:\StableDiffusionData\embeddings' --hypernetwork-dir 'E:\StableDiffusionData\models\hypernetworks' --lora-dir 'E:\StableDiffusionData\models\Lora' --xformers --no-half-vae --opt-split-attention --api --cors-allow-origins=http://127.0.0.1:3456 --gradio-inpaint-tool color-sketch --cors-allow-origins http://localhost:5173

List of extensions

so, so many. all have functioned fine (or not caused issues, nothin new installed in my past few a1111 sessions)

Console logs

venv "D:\Github\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: a9fed7c364061ae6efb37f797b6b522cb3cf7aa2
Installing requirements for Web UI
Expecting value: line 1 column 1 (char 0)
Installing None
Installing onnxruntime-gpu...
Installing None
Installing opencv-python...
Installing None
Installing Pillow...

Installing requirements for Batch Face Swap


Installing sd-dynamic-prompts requirements.txt





Launching Web UI with arguments: --autolaunch --disable-safe-unpickle --ckpt-dir E:\StableDiffusionData\models\Stable-diffusion --gfpgan-models-path E:\StableDiffusionData\models\GFPGAN --codeformer-models-path E:\StableDiffusionData\models\Codeformer --esrgan-models-path E:\StableDiffusionData\models\ESRGAN --embeddings-dir E:\StableDiffusionData\embeddings --hypernetwork-dir E:\StableDiffusionData\models\hypernetworks --lora-dir E:\StableDiffusionData\models\Lora --xformers --no-half-vae --opt-split-attention --api --cors-allow-origins=http://127.0.0.1:3456 --gradio-inpaint-tool color-sketch --cors-allow-origins http://localhost:5173
Traceback (most recent call last):
  File "D:\Github\stable-diffusion-webui\launch.py", line 381, in <module>
    start()
  File "D:\Github\stable-diffusion-webui\launch.py", line 372, in start
    import webui
  File "D:\Github\stable-diffusion-webui\webui.py", line 28, in <module>
    from modules import extra_networks, ui_extra_networks_checkpoints
  File "D:\Github\stable-diffusion-webui\modules\ui_extra_networks_checkpoints.py", line 5, in <module>
    from modules import shared, ui_extra_networks, sd_models
  File "D:\Github\stable-diffusion-webui\modules\shared.py", line 665, in <module>
    opts.load(config_filename)
  File "D:\Github\stable-diffusion-webui\modules\shared.py", line 602, in load
    self.data = json.load(file)
  File "C:\Users\bunnyviking\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\Users\bunnyviking\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Users\bunnyviking\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\bunnyviking\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Press any key to continue . . .

Additional information

No response

@tenabraex tenabraex added the bug-report Report of a bug, yet to be confirmed label Mar 23, 2023
@MaxiKitti
Copy link

Its the same here i had it working until now

@SoldierAb
Copy link

SoldierAb commented Mar 27, 2023

Oops. Encountered the same problem when saving pictures
image

@LEOBellocZane
Copy link

Same here got this issue

@nbx1234
Copy link

nbx1234 commented Mar 28, 2023

How to fix it?

@krugerpao
Copy link

krugerpao commented Apr 2, 2023

hello, I get same problem,
I have 2 copy SD int D:\A & D:\B
when A run this error ( yes, after generating images fail),
I find some file in A changed Date,
so I copy B ui-config.json and config.json to A, Then A work Back!
I don't know why , But it's work , FYI! : )

@linuxdevopscn
Copy link

I also encountered the same problem. When I printed filename, I found that the file was config.json. When I checked the json file, I found that the file was corrupted. I deleted config.json and restarted the service, which was able to run successfully, but some of my previous configurations were lost and restored to default configurations. I don't know why this file was corrupted.

@brehiner
Copy link

brehiner commented May 9, 2023

same problem

@CirnoChan999
Copy link

CirnoChan999 commented Sep 4, 2023

What is causing this?

loading settings: JSONDecodeError Traceback (most recent call last): File "F:\Programs\Stable Diffusion WebUI\webui\modules\ui_loadsave.py", line 30, in __init__ self.ui_settings = self.read_from_file() File "F:\Programs\Stable Diffusion WebUI\webui\modules\ui_loadsave.py", line 132, in read_from_file return json.load(file) File "json\__init__.py", line 293, in load File "json\__init__.py", line 346, in loads File "json\decoder.py", line 337, in decode File "json\decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@CirnoChan999
Copy link

Solved it by deleting some config files.
This will reset all of the settings you've set before.
You might want to check if one of the files has size 0, that might be the only file that needs to be deleted.

These are the files I deleted:

  1. ui-config.json
  2. cache.json
  3. config.json

All of these files are generated again while the Automatic1111 is running.
The config.json is generated only after you save your settings once.

Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

9 participants