Python: 'json_store_client' returning 'null' upon request

30 views Asked by At

I'm trying to contact json_store_client to see how many times my program has been executed. However, although I have a proper key, I get thrown the following error:

/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'

I'm more worried about the first error, as it has to do directly with getting the data. I went to jsonstore.io and copy-pasted the given key. Is this not enough? Or is there another way to do this?

Current code:

from json_store_client import Client
key = "168034i5o4433136733f5e6c9c70bdee1a113474602675459e3ffa9bd584a03314f"
client = Client(key)
runs = client.retrieve("runs")
runnum = client.store("runs", runs + 1)
print(runnum)
0

There are 0 answers