The error is:
ubidots.apiclient.UbidotsInvalidInputError: Key "timestamp" must point to an int value.
However, int(time.time())*1000 yields a long. It looks like there is an explicit isinstance check to int.
Code to reproduce:
import math
import time
import ubidots
api = ubidots.ApiClient('ad7bd8a9df9371251945c1b61a8179e695729255',
base_url='http://localhost:8000/api/')
c = api.get_variable('5399ed0527a5141a63d55177')
s = api.get_variable('5399ed1127a5141a63d55178')
for i in range(1000):
timestamp = int(time.time())*1000
c.save_value({'value': math.cos(time.time() / 100.0),
'timestamp': timestamp})
s.save_value({'value': math.sin(time.time() / 100.0),
'timestamp': timestamp})
time.sleep(10)
The error is:
ubidots.apiclient.UbidotsInvalidInputError: Key "timestamp" must point to an int value.
However,
int(time.time())*1000
yields along
. It looks like there is an explicitisinstance
check toint
.Code to reproduce: