Skip to content

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

@ZhangJinian

Description

@ZhangJinian

Describe the issue

Issue:

I deployed grounddino, and encountered this error when running the segment task example.
Can someone help me?

Command:

python -m llava.serve.controller --host 0.0.0.0 --port 20001

CUDA_VISIBLE_DEVICES=0,1 python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:20001 --port 40000 --worker http://localhost:40000 --model-path /media/lzd/7BF1B57C17F7994E/ubantu/zjn/LLaVA-Plus/llava_plus_v0_7b

python Grounded-Segment-Anything/grounding_dino_worker.py

python -m llava.serve.gradio_web_server_llava_plus --controller http://localhost:20001 --model-list-mode reload```

Log:

2025-07-01 16:01:19 | INFO | stdout | template_name:  vicuna_v1
2025-07-01 16:01:19 | INFO | stdout | Messages: [['USER', ('segment birds in the image, then tell how many birds in it\n<image>', <PIL.Image.Image image mode=RGB size=601x400 at 0x7C253BB9FE50>, 'Crop', <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=601x400 at 0x7C253BB9E4D0>)], ['ASSISTANT', None]]
2025-07-01 16:01:19 | INFO | gradio_web_server | model_name: grounding_dino, worker_addr: http://localhost:40001
2025-07-01 16:01:19 | INFO | gradio_web_server | ==== request ====
{'model': 'grounding_dino', 'prompt': "A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: <image>\nsegment birds in the image, then tell how many birds in it ASSISTANT:", 'temperature': 0.2, 'top_p': 0.7, 'max_new_tokens': 512, 'stop': '</s>', 'images': "List of 1 images: ['326f83897bb34c5aa9efd8210d2cb935']"}
==== request ====
2025-07-01 16:01:19 | ERROR | stderr | Traceback (most recent call last):
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/site-packages/gradio/routes.py", line 437, in run_predict
2025-07-01 16:01:19 | ERROR | stderr |     output = await app.get_blocks().process_api(
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/site-packages/gradio/blocks.py", line 1352, in process_api
2025-07-01 16:01:19 | ERROR | stderr |     result = await self.call_function(
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/site-packages/gradio/blocks.py", line 1093, in call_function
2025-07-01 16:01:19 | ERROR | stderr |     prediction = await utils.async_iteration(iterator)
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/site-packages/gradio/utils.py", line 341, in async_iteration
2025-07-01 16:01:19 | ERROR | stderr |     return await iterator.__anext__()
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/site-packages/gradio/utils.py", line 334, in __anext__
2025-07-01 16:01:19 | ERROR | stderr |     return await anyio.to_thread.run_sync(
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
2025-07-01 16:01:19 | ERROR | stderr |     return await get_async_backend().run_sync_in_worker_thread(
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
2025-07-01 16:01:19 | ERROR | stderr |     return await future
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 967, in run
2025-07-01 16:01:19 | ERROR | stderr |     result = context.run(func, *args)
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/site-packages/gradio/utils.py", line 317, in run_sync_iterator_async
2025-07-01 16:01:19 | ERROR | stderr |     return next(iterator)
2025-07-01 16:01:19 | ERROR | stderr |   File "/media/lzd/7BF1B57C17F7994E/ubantu/zjn/LLaVA-Plus/llava/serve/gradio_web_server_llava_plus.py", line 467, in http_bot
2025-07-01 16:01:19 | ERROR | stderr |     data = json.loads(chunk.decode())
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/json/__init__.py", line 346, in loads
2025-07-01 16:01:19 | ERROR | stderr |     return _default_decoder.decode(s)
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/json/decoder.py", line 337, in decode
2025-07-01 16:01:19 | ERROR | stderr |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2025-07-01 16:01:19 | ERROR | stderr |   File "/home/lzd/anaconda3/envs/llavaplus/lib/python3.10/json/decoder.py", line 355, in raw_decode
2025-07-01 16:01:19 | ERROR | stderr |     raise JSONDecodeError("Expecting value", s, err.value) from None
2025-07-01 16:01:19 | ERROR | stderr | json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Screenshots:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions