Python with Edison Board - ERROR from ubidots import ApiClient


Hello guys,
Im trying to connect my edison board to the ubidots cloud with python. However when I try to import the ApiClient

from ubidots import ApiClient
Traceback (most recent call last):
File “”, line 1, in
File “/home/root/”, line 10, in
ImportError: cannot import name ApiClient

Can someone help me ?

Thanks in advance,


Hi @andrelmbraga,

Could you show me your code please ?

All the best,
Catalina M.


I followed the tutorial in ubidots website

import time, mraa
from ubidots import ApiClient

#Connect to Ubidots

for i in range(0,5):
print “Connecting to Ubidots”
api = ApiClient(token=‘d195c0044fcasdfdf9dsfab9d653af3’) # Replace with your Ubidots Token here

    print "No internet connection, retrying..."

Assign analog pins

a0 = mraa.Aio(0)
a1 = mraa.Aio(1)

Read analog pins and send values to Ubidots

api.save_collection([{‘variable’: ‘Put_Here_Your_Variable_ID_1’,‘value’}, {‘variable’: ‘Put_Here_Your_Variable_ID_2’,‘value’}])
print(“Couldn’t send data.”)


Looks like the Ubidots library isn’t installed in your system. Could you try installing it again and posting the output of the action?

pip install ubidots

If you don’t see any error message in the output, try executing your program again, please.

Have a great day :grinning: