Find() function in Python API

Python, Java, Android OS, etc.
kuznip
Posts: 5
Joined: Thu Jan 28, 2016 1:54 pm

Find() function in Python API

Postby kuznip » Thu Feb 04, 2016 9:41 am

Hi, All.
I can't get, how to use find() function in Bitalino Python API. My code is straightforward - I'm trying to find and list all available devices:

Code: Select all

import bitalino
dev=bitalino.BITalino.find()
print(dev)


Anyway, I get an error in my PyCharm, with the following error:
TypeError: unbound method find() must be called with BITalino instance as first argument (got nothing instead)

What argument should I pass? If it's the equipment ID, then are there ways to list all connected devices without specifying them directly?
Thanks in advance.

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: Find() function in Python API

Postby BITalino » Thu Feb 04, 2016 10:20 am

Hi there,

Please confirm that you are using the latest version of the BITalino API:
https://github.com/BITalinoWorld/python-api/blob/master/bitalino.py

In this version you should be able to call the find() method by doing:

Code: Select all

import bitalino
dev = bitalino.find()
print(dev)


Let us know how this works out for you and/or if you experience any issues.

Best regards,
The BITalino Team

kuznip
Posts: 5
Joined: Thu Jan 28, 2016 1:54 pm

Re: Find() function in Python API

Postby kuznip » Tue Feb 09, 2016 3:11 pm

Yes, I've downloaded the last version of Bitalino API (instead of using Bitalino API, downloaded by PyCharm from default repository) - it works now OK. Thank you for the help.

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: Find() function in Python API

Postby BITalino » Tue Feb 09, 2016 7:36 pm

Perfect... if you have any further questions, do let us know.

Best regards,
The BITalino Team


Return to “Programming APIs”




cron