Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

今天安装跑不起来了 json.decoder.JSONDecodeError,前天还不会出现此问题 #39

Open
alexhmyang opened this issue May 31, 2023 · 4 comments

Comments

@alexhmyang
Copy link

alexhmyang commented May 31, 2023

你们现在重新装 会报错,以前装的不会 ,应该是 python环境变化了

image

chatdoc-backend | Traceback (most recent call last):
chatdoc-backend | File "/data/main.py", line 3, in
chatdoc-backend | from doc_util import Doc
chatdoc-backend | File "/data/doc_util.py", line 19, in
chatdoc-backend | CJKPDFReader = download_loader("CJKPDFReader")
chatdoc-backend | File "/usr/local/lib/python3.9/site-packages/llama_index/readers/download.py", line 125, in download_loader
chatdoc-backend | library = json.loads(library_raw_content)
chatdoc-backend | File "/usr/local/lib/python3.9/json/init.py", line 346, in loads
chatdoc-backend | return _default_decoder.decode(s)
chatdoc-backend | File "/usr/local/lib/python3.9/json/decoder.py", line 340, in decode
chatdoc-backend | raise JSONDecodeError("Extra data", s, end)
chatdoc-backend | json.decoder.JSONDecodeError: Extra data: line 1 column 4 (char 3)

@alexhmyang alexhmyang changed the title 今天安装跑不起来了 今天安装跑不起来了 json.decoder.JSONDecodeError,前天还不会出现此问题 May 31, 2023
@haojieZzz
Copy link

+1

@NanJhin
Copy link

NanJhin commented Jun 9, 2023

++1 兄台最后解决了咩

@haojieZzz
Copy link

haojieZzz commented Jun 9, 2023

主要两步:

  1. 升级/server/requirements.txt 中 两个库的版本号为:
langchain==0.0.154
llama_index==0.6.15
  1. /server/doc_util.py中 line5 改为如下:
from llama_index import SimpleDirectoryReader, QuestionAnswerPrompt, LLMPredictor, GPTVectorStoreIndex as GPTSimpleVectorIndex

@NanJhin
Copy link

NanJhin commented Jun 10, 2023

谢谢老哥

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants