Giter VIP home page Giter VIP logo

python-aardvark's People

Contributors

abardagjy avatar brotatos avatar hthiery avatar mwalle avatar nosjojo avatar sacherjj avatar tnorth avatar webmeister avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-aardvark's Issues

MacOS 10.10/Python2.7 not working

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

unable to bind to python API

hi,

I installed the pyaardvark in pycharm of version 0.6.1, when i import this API, an error message came up as below:
my python version is 3.7, how can i update to your new version?

image

PyInstaller and Total Phase dll

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.

  • The python version is incompatible with the aardvark.dll version
  • There is an issue with detection of python3.dll

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.

ImportError on M1 mac

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

Installation from tar.gz does not work on windows

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??

What work would be required to support python 3

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?

i2c_master_write does not detect write failures

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).

Device is always in use

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?

Unable to Bind to API

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 asserts if no device is connected

$ 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.