有大佬知道这个报错怎么处理吗,是自定义函数模块的问题吗

报错日志
Traceback (most recent call last):
File “”, line 18, in
File “/opt/py3/lib/python3.11/site-packages/diskcache/core.py”, line 796, in set
with self._transact(retry, filename) as (sql, cleanup):
File “/usr/local/lib/python3.11/contextlib.py”, line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File “/opt/py3/lib/python3.11/site-packages/diskcache/core.py”, line 730, in _transact
raise Timeout from None
diskcache.core.Timeout

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “”, line 1, in
File “”, line 21, in
File “/opt/py3/lib/python3.11/site-packages/diskcache/core.py”, line 499, in init
sql(query, (key, value))
File “/opt/py3/lib/python3.11/site-packages/diskcache/core.py”, line 666, in _execute_with_retry
return sql(statement, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: attempt to write a readonly database

什么样的自定义函数

这是Python写的一个获取json串某一数据的一个函数
import json
import re
import regex

def normalize_json_value(value):
if isinstance(value, (dict, list)):
return json.dumps(value, ensure_ascii=False)
elif value is None:
return None
elif isinstance(value, (str, int, float, bool)):
return str(value)
else:
raise TypeError(f"Unsupported value type: {type(value)}")

def lower_keys(x):
if isinstance(x, dict):
return {k.lower(): lower_keys(v) for k, v in x.items()}
elif isinstance(x, list):
return [lower_keys(i) for i in x]
else:
return x

def clean_json(raw):
pattern = r’‘’
(?P
{ # 对象开头
(?:[^{}[]]|(?R))* # 允许嵌套
}
|
[ # 数组开头
(?:[^[]{}]|(?R))* # 允许嵌套
]
)
‘’’
matches = regex.findall(pattern, raw, flags=regex.VERBOSE | regex.DOTALL)
for m in matches:
try:
return m
except Exception:
continue
return None

def GetJsonProperty(Json,name):
cleaned=clean_json(Json)
list_cleaned=json.loads(cleaned,object_hook=lower_keys)
return normalize_json_value(list_cleaned[name.lower()])