[GH-ISSUE #80] json.decoder.JSONDecodeError with chromadb, classify #54

Closed
opened 2026-10-15 18:03:47 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @WTByte on GitHub (Jul 13, 2023).
Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/80

I receive the following error after running pip install -r requirements-complete.txt followed by python server.py --enable-modules=caption,summarize,classify,chromadb. Currently running python 3.10.

I've tried deleting the virtual environment and pulling a fresh repo but issue still persists. Only happens when trying to use the classify or chromadb modules.

Using torch device: cpu
Initializing an image captioning model...
Initializing a text summarization model...
Initializing a sentiment classification pipeline...
Traceback (most recent call last):
  File "D:\Documents\Projects\Code\SillyTavern-extras\server.py", line 191, in <module>
    classification_pipe = pipeline(
  File "D:\Documents\Projects\Code\SillyTavern-extras\venv\lib\site-packages\transformers\pipelines\__init__.py", line 876, in pipeline
    tokenizer = AutoTokenizer.from_pretrained(
  File "D:\Documents\Projects\Code\SillyTavern-extras\venv\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 642, in from_pretrained
    tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
  File "D:\Documents\Projects\Code\SillyTavern-extras\venv\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 507, in get_tokenizer_config
    result = json.load(reader)
  File "C:\Users\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\Users\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Users\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\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)
Originally created by @WTByte on GitHub (Jul 13, 2023). Original GitHub issue: https://github.com/SillyTavern/SillyTavern-Extras/issues/80 I receive the following error after running `pip install -r requirements-complete.txt` followed by `python server.py --enable-modules=caption,summarize,classify,chromadb`. Currently running python 3.10. I've tried deleting the virtual environment and pulling a fresh repo but issue still persists. Only happens when trying to use the `classify` or `chromadb` modules. ``` Using torch device: cpu Initializing an image captioning model... Initializing a text summarization model... Initializing a sentiment classification pipeline... Traceback (most recent call last): File "D:\Documents\Projects\Code\SillyTavern-extras\server.py", line 191, in <module> classification_pipe = pipeline( File "D:\Documents\Projects\Code\SillyTavern-extras\venv\lib\site-packages\transformers\pipelines\__init__.py", line 876, in pipeline tokenizer = AutoTokenizer.from_pretrained( File "D:\Documents\Projects\Code\SillyTavern-extras\venv\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 642, in from_pretrained tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs) File "D:\Documents\Projects\Code\SillyTavern-extras\venv\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 507, in get_tokenizer_config result = json.load(reader) File "C:\Users\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 293, in load return loads(fp.read(), File "C:\Users\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) File "C:\Users\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\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) ```
Author
Owner

@Cohee1207 commented on GitHub (Jul 13, 2023):

Looks like a corrupt model. Try cleaning the HF hub downloads cache and redownload it. Usually in your user profile directory, .cache/huggingface/hub

<!-- gh-comment-id:1634994346 --> @Cohee1207 commented on GitHub (Jul 13, 2023): Looks like a corrupt model. Try cleaning the HF hub downloads cache and redownload it. Usually in your user profile directory, .cache/huggingface/hub
Author
Owner

@WTByte commented on GitHub (Jul 14, 2023):

Thanks! Yes I managed to resolve the issue by deleting the chroma, huggingface and torch directories in .cache. Then rerunning python server.py --enable-modules=caption,summarize,classify,chromadb

<!-- gh-comment-id:1635889878 --> @WTByte commented on GitHub (Jul 14, 2023): Thanks! Yes I managed to resolve the issue by deleting the `chroma`, `huggingface` and `torch` directories in `.cache`. Then rerunning `python server.py --enable-modules=caption,summarize,classify,chromadb`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SillyTavern/SillyTavern-Extras#54
No description provided.