kontron / python-aardvark Goto Github PK
View Code? Open in Web Editor NEWPython library for the Total Phase Aardvark I2C/SPI host adapter
License: GNU Lesser General Public License v2.1
Python library for the Total Phase Aardvark I2C/SPI host adapter
License: GNU Lesser General Public License v2.1
Hi,
Total Phase officially released the new API (v6.00). Could you please also make an update? Thanks very much!
Here is the link: https://www.totalphase.com/products/aardvark-software-api/#
We verified this new API version, and it did solved the issue we observed on the latest Ubuntu 22.04.
Thanks!
I installed with 'easy_install pyaardvark' on Yosemite and get the following error:
import pyaardvark
File "build/bdist.macosx-10.10-intel/egg/pyaardvark/init.py", line 22, in
File "build/bdist.macosx-10.10-intel/egg/pyaardvark/aardvark.py", line 52, in
RuntimeError: Unable to find suitable binary interface. Unsupported platform?
Is it not supported on Yosemite? Or am I missing something I need.
Thanks,
Frank
For using python-aardvark under windows use v2.16.
See also kontron/python-ipmi#95
instead of the port number let the user supply a serial number, too.
I was fighting with this one recently and finally sorted it out with some help from the PyInstaller devs and some info from Total Phase. I wanted to mention it here so it could be documented for future users, especially if someone updates to newer pyaardvark versions.
The newest versions of the aardvark.dll, from version 5.60+, now have a python3.dll requirement baked into them. This seems to manifest into a few odd issues, particularly the popup messages of "OSError: [Errno -2] unable to load usb driver" and "Unable to bind API".
This error comes from one of two different sources, from what I've seen.
For PyInstaller specifically, the python3.dll isn't being included automatically in the build, so I get the errors above depending on which version of pyaardvark I'm running. The instructions to correct for this can be found here: pyinstaller/pyinstaller#7326 (comment)
If you know you have the correct python version and are seeing one of these errors, it may be related to the python3.dll not being detected, especially if you are running a separate program that is interfacing with python to run your code, rather than directly in the interpreter.
Hi, I tried to run an example code as below `import aardvark_py as a
a.aa_find_devices(1)
handle = a.aa_open(0)
print(a.aa_features(handle))
a.aa_close(handle)`
But I am getting an error as below. Are any dependencies missing/not available for an M1 Mac at the moment?
/usr/local/bin/python3.10 /Users/devangsinghs/PycharmProjects/pressureSensor/aardvark_test.py
Traceback (most recent call last):
File "/Users/devangsinghs/PycharmProjects/pressureSensor/aardvark_test.py", line 1, in
import aardvark_py as a
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aardvark_py/init.py", line 93, in
from . import aardvark as api
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aardvark_py/aardvark/init.py", line 17, in
from .darwin import *
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aardvark_py/aardvark/darwin/init.py", line 11, in
from .arch64 import *
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aardvark_py/aardvark/darwin/arch64/init.py", line 9, in
from .aardvark import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aardvark_py/aardvark/darwin/arch64/aardvark.so, 0x0002): tried: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aardvark_py/aardvark/darwin/arch64/aardvark.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
Process finished with exit code 1
I have successfully imported pyaardvark however when i try to run the code below:
`import pyaardvark
a = pyaardvark.open()`
i get the errors below:
Traceback (most recent call last):
File "C:\Users\oneilp6\Documents\python\1905_HOCD1_C1_602_B2\1905\Exercises\lab_eq\scratch.py", line 1, in
import pyaardvark
File "build\bdist.win32\egg\pyaardvark__init__.py", line 22, in
File "build\bdist.win32\egg\pyaardvark\aardvark.py", line 52, in
RuntimeError: Unable to find suitable binary interface. Unsupported platform?
Any ideas??
Hi,
I really like this project, and I am sure I could contribute.
I have done work (outside of github) on converting python projects to be python 2/3 agnostic.
But I havn't done any DLL communication or anything like that.
So what I am saying is, if I submit a pull request containing updates to python3, would somebody be willing to ensure that the python3 executable works with the aardvark dll?
I've been using this library in a project quite successfully (thanks for making it easy to use!), but I've noticed that sometimes I2C writes don't go through and the API does not provide any indication of this. (There are multiple masters in my system, so probably it's losing arbitration.)
The root cause seems to be that Aardvark.i2c_master_write treats the return value of aa_i2c_write as a status code, when that function actually returns the number of bytes written. Therefore some exception should be raised whenever the return value is less than len(data). Or even better, use aa_i2c_write_ext which actually does return a status code (I'd really like to know if SLA_ACK, SLA_NACK, DATA_NACK, or ARB_LOST statuses occur).
Hi there,
I noticed that opening the device fails with an IO Error (device in use) whenever using pyaardvark from a remote session (SSH or Remote desktop).
Does the library depend on some environment variable not defined in remote sessions? Any hint/workaround?
Hello, The Bind to API error is back.
Running Python 3.10,
P:>pip install pyaardvark
Collecting pyaardvark
Using cached pyaardvark-0.7.tar.gz (184 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: future in c:\users\swood08\appdata\local\programs\python\python310\lib\site-packages (from pyaardvark) (0.18.2)
Installing collected packages: pyaardvark
DEPRECATION: pyaardvark is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559
Running setup.py install for pyaardvark ... done
Successfully installed pyaardvark-0.7
I get the following error when trying to import pyaardvark in IDLE
Python API
Unable to bind to Python API
API supports Python 2.5-2.7, 3.2-3.9
I'm using the latest windows drivers for the Aardvark
Thanks
$ aardvark scan
Traceback (most recent call last):
File "bin/aardvark", line 9, in
load_entry_point('pyaardvark==0.2.1', 'console_scripts', 'aardvark')()
File "/home/mwalle/test2/local/lib/python2.7/site-packages/pyaardvark/cli_tool.py", line 147, in main
args.func(a, args)
File "/home/mwalle/test2/local/lib/python2.7/site-packages/pyaardvark/cli_tool.py", line 70, in scan
for port in pyaardvark.find_devices():
File "/home/mwalle/test2/local/lib/python2.7/site-packages/pyaardvark/aardvark.py", line 63, in find_devices
assert num_devices > 0
AssertionError
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.