Мой код:
import json
with open('values.json') as json_file:
values = json.load(json_file)
values['new'] = 1
print(values)
Код ошибки:
Traceback (most recent call last):
File "C:\Users\Artyom\PycharmProjects\Bank telegram\test.py", line 4, in <module>
values = json.load(json_file)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Artyom\AppData\Local\Programs\Python\Python311\Lib\json\__init__.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "C:\Users\Artyom\AppData\Local\Programs\Python\Python311\Lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Artyom\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Artyom\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Как исправить данную ошибку?