Bug描述
Bug
我创建了一个公共笔记本,用于公共拉格基准测试。它在v0.10.11上运行得非常好,但现在我在下载_llama_数据集时遇到了问题。
JSONDecodeError: Extra data: line 1 column 4 (char 3)
确切的错误是:
RUN ID : 226e64cb-761d-4ae8-8d58-64d00e15ecbd
PaulGrahamEssayDataset
版本
v0.10.31
重现步骤
download_llama_data('PaulGrahamEssayDataset', './data')
相关日志/回溯
JSONDecodeError Traceback (most recent call last)
[<ipython-input-17-2c82eb180180>](https://localhost:8080/#) in <cell line: 29>()
27 return None
28
---> 29 download_dataset(dataset_name)
30 dataset_path = find_source_files_dir(f"data/{dataset_name}/{run_id}")
31 rag_dataset_path = find_rag_dataset_json(f"data/{dataset_name}/{run_id}")
4 frames
[<ipython-input-17-2c82eb180180>](https://localhost:8080/#) in download_dataset(name)
9 os.makedirs(f"data/{name}/{run_id}")
10 print(name)
---> 11 download_llama_dataset(
12 name, custom_path=f"data/{name}/{run_id}", show_progress=True
13 )
[/usr/local/lib/python3.10/dist-packages/llama_index/core/download/dataset.py](https://localhost:8080/#) in download_llama_dataset(dataset_class, llama_datasets_url, llama_datasets_lfs_url, llama_datasets_source_files_tree_url, refresh_cache, custom_dir, custom_path, source_files_dirpath, library_path, disable_library_cache, override_path, show_progress)
223
224 # fetch info from library.json file
--> 225 dataset_info = get_dataset_info(
226 local_dir_path=dirpath,
227 remote_dir_path=llama_datasets_url,
[/usr/local/lib/python3.10/dist-packages/llama_index/core/download/dataset.py](https://localhost:8080/#) in get_dataset_info(local_dir_path, remote_dir_path, remote_source_dir_path, dataset_class, refresh_cache, library_path, source_files_path, disable_library_cache)
81 str(remote_dir_path), f"/{library_path}"
82 )
---> 83 library = json.loads(library_raw_content)
84 if dataset_class not in library:
85 raise ValueError("Loader class name not found in library")
[/usr/lib/python3.10/json/__init__.py](https://localhost:8080/#) in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
344 parse_int is None and parse_float is None and
345 parse_constant is None and object_pairs_hook is None and not kw):
--> 346 return _default_decoder.decode(s)
347 if cls is None:
348 cls = JSONDecoder
[/usr/lib/python3.10/json/decoder.py](https://localhost:8080/#) in decode(self, s, _w)
338 end = _w(s, end).end()
339 if end != len(s):
--> 340 raise JSONDecodeError("Extra data", s, end)
341 return obj
342
JSONDecodeError: Extra data: line 1 column 4 (char 3)
- 无响应*
1条答案
按热度按时间pn9klfpd1#
你遇到的
JSONDecodeError
提示表明在解析的 JSON 中存在除单个 JSON 对象或数组之外的额外数据,或者 JSON 语法存在问题。此错误可能发生在读取本地缓存、获取远程内容或处理数据集信息等各种情况下。要解决此问题:
library.json
或特定于数据集的card.json
)在主 JSON 对象之后没有多余的数据。如果这些步骤不能解决问题,请考虑联系
LlamaIndex
项目维护者以获得更具体的支持。详细信息
来源
关于 Dosu
此响应旨在帮助你节省时间并提供有用的信息。它不是精确的解决方案,而是你自己研究的起点。
帮助我变得更有用!如果这有帮助请留下一个 👍,如果无关请留下一个 👎。