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

json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 34) #75

Closed
tangyipeng100 opened this issue Jul 16, 2023 · 4 comments
Closed

Comments

@tangyipeng100
Copy link

Here is my error details:

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/uvicorn/protocols/websockets/wsproto_impl.py", line 249, in run_asgi
    result = await self.app(self.scope, self.receive, self.send)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/fastapi/applications.py", line 289, in __call__
    await super().__call__(scope, receive, send)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/starlette/middleware/errors.py", line 149, in __call__
    await self.app(scope, receive, send)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
    raise e
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
    await self.app(scope, receive, send)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
    await route.handle(scope, receive, send)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/starlette/routing.py", line 341, in handle
    await self.app(scope, receive, send)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/starlette/routing.py", line 82, in app
    await func(session)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/site-packages/fastapi/routing.py", line 324, in app
    await dependant.call(**values)
  File "/home/lhs/文档/typ/gpt-researcher/main.py", line 50, in websocket_endpoint
    await manager.start_streaming(task, report_type, agent, websocket)
  File "/home/lhs/文档/typ/gpt-researcher/agent/run.py", line 38, in start_streaming
    report, path = await run_agent(task, report_type, agent, websocket)
  File "/home/lhs/文档/typ/gpt-researcher/agent/run.py", line 50, in run_agent
    await assistant.conduct_research()
  File "/home/lhs/文档/typ/gpt-researcher/agent/research_agent.py", line 137, in conduct_research
    search_queries = await self.create_search_queries()
  File "/home/lhs/文档/typ/gpt-researcher/agent/research_agent.py", line 92, in create_search_queries
    return json.loads(result)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/home/lhs/anaconda3/envs/gptresearcher/lib/python3.10/json/decoder.py", line 340, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 34)
@tangyipeng100
Copy link
Author

And the first searching results have been output like
["What is AFP layup inspection?"]
["Benefits of AFP layup inspection"]
["Challenges in AFP layup inspection"]
["Comparison of AFP layup inspection with other inspection methods"]
and then comes the below errors.

@polygonfuture
Copy link

Same exact thing happening to me.

Using GPT 3.5-turbo, docker container for running environment.

@tangyipeng100
Copy link
Author

How to solve it without running docker?

@rotemweiss57
Copy link
Contributor

Hi @polygonfuture and @tangyipeng100 , please refer to the workaround here: #14
Also, it will all be solved in Aug when everyone will have access to gpt-4

Hope it helps!

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

No branches or pull requests

3 participants