我正在尝试与json_store_client
联系,以查看我的程序已执行了多少次。但是,尽管我有正确的密钥,但会抛出以下错误:
/home/runner/.local/lib/python3.6/site-packages/json_store_client/__init__.py:99: EmptyResponseWarning: Jsonstore returned null, please make sure something is saved under this key.
warn('Jsonstore returned null, please make sure something issaved under this key.', EmptyResponseWarning)
Traceback (most recent call last):
File "main.py", line 5, in <module>
runnum = client.store("runs", runs + 1)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
我更担心第一个错误,因为它直接与获取数据有关。我去了jsonstore.io并复制粘贴了给定的密钥。这还不够吗?还是有其他方法可以做到这一点?
当前代码:
from json_store_client import Client
key = "168034i5o4433136733f5e6c9c70bdee1a113474602675459e3ffa9bd584a03314f"
client = Client(key)
runs = client.retrieve("runs")
runnum = client.store("runs", runs + 1)
print(runnum)