JSONDecodeError Traceback (most recent call last) /tmp/ipykernel_359/4235953312.py in 1 import os ----> 2 from modelscope.pipelines import pipeline 3 from modelscope.utils.constant import Tasks 4 from modelscope.utils.cv.image_utils import show_image_driving_perception_result 5 from modelscope.preprocessors.image import LoadImage
/opt/conda/lib/python3.7/site-packages/modelscope/pipelines/init.py in 2 from typing import TYPE_CHECKING 3 ----> 4 from modelscope.utils.import_utils import LazyImportModule 5 from . import audio, cv, multi_modal, nlp 6 from .base import Pipeline
/opt/conda/lib/python3.7/site-packages/modelscope/utils/import_utils.py in 360 361 --> 362 class LazyImportModule(ModuleType): 363 AST_INDEX = None 364 if AST_INDEX is None:
/opt/conda/lib/python3.7/site-packages/modelscope/utils/import_utils.py in LazyImportModule() 363 AST_INDEX = None 364 if AST_INDEX is None: --> 365 AST_INDEX = load_index() 366 367 def init(self,
/opt/conda/lib/python3.7/site-packages/modelscope/utils/ast_utils.py in load_index(file_list, force_rebuild, indexer_file_dir, indexer_file) 681 local_changed = False 682 if not force_rebuild and os.path.exists(file_path): --> 683 wrapped_index = _load_index(file_path) 684 md5, files_mtime = file_scanner.files_mtime_md5(file_list=file_list) 685 if (wrapped_index[VERSION_KEY] == version):
/opt/conda/lib/python3.7/site-packages/modelscope/utils/ast_utils.py in _load_index(file_path, with_template) 595 bytes_index = bytes_index.decode().replace(TEMPLATE_PATH, 596 MODELSCOPE_PATH.as_posix()) --> 597 wrapped_index = json.loads(bytes_index) 598 # convert str key to tuple key 599 wrapped_index[INDEX_KEY] = {
/opt/conda/lib/python3.7/json/init.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 346 parse_int is None and parse_float is None and 347 parse_constant is None and object_pairs_hook is None and not kw): --> 348 return _default_decoder.decode(s) 349 if cls is None: 350 cls = JSONDecoder
/opt/conda/lib/python3.7/json/decoder.py in decode(self, s, _w) 335 336 """ --> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 338 end = _w(s, end).end() 339 if end != len(s):
/opt/conda/lib/python3.7/json/decoder.py in raw_decode(self, s, idx) 353 obj, end = self.scan_once(s, idx) 354 except StopIteration as err: --> 355 raise JSONDecodeError("Expecting value", s, err.value) from None 356 return obj, end
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
将这个删除文件试试:/mnt/workspace/.cache/modelscope/ast_indexer
ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352