Comments (5)
Could you run with that fix for a while and see if it errors again? I'll try and get to the bottom of this! Thanks.
from pifacecommon.
Ok, I've merged a fix into the testing branch. It's not a direct fix but I've implemented the SPI transfer more closely to how you're supposed to do it in C. Hopefully, by letting the the include file do the heavy lifting the bug should disappear! Let me know how you get on. I'll merge it into master later today, if there aren't any issues.
from pifacecommon.
You have a typo in linux_spi_spidev.py.
line 3
from asm_generic_ioctl import _IOR, _IOW, _IOC_SIZEBITS
is missing a dot before "asm_generic_ioctl", like:
from .asm_generic_ioctl import _IOR, _IOW, _IOC_SIZEBITS
The problem was detected at the install of pifacedigitalio (see bellow). But because pifacedigitalio downloaded locally the master branch of pifacecommon, the install finished, but without the fix...
I fixed the typo and going to test the fix.
cd pifacedigitalio
sudo ./install.sh
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.2/dist-packages/pifacecommon/init.py", line 23, in
from .core import (
File "/usr/local/lib/python3.2/dist-packages/pifacecommon/core.py", line 25, in
from .linux_spi_spidev import spi_ioc_transfer, SPI_IOC_MESSAGE
File "/usr/local/lib/python3.2/dist-packages/pifacecommon/linux_spi_spidev.py", line 3, in
from asm_generic_ioctl import _IOR, _IOW, _IOC_SIZEBITS
ImportError: No module named asm_generic_ioctl
Downloading pifacecommon...
Cloning into 'pifacecommon'...
remote: Counting objects: 172, done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 172 (delta 97), reused 159 (delta 84)
Receiving objects: 100% (172/172), 48.68 KiB, done.
Resolving deltas: 100% (97/97), done.
The spi rules file already exists.
Exiting...
The gpio rules file already exists.
Exiting...
Installing pifacecommon...
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/pifacecommon
copying pifacecommon/init.py -> build/lib/pifacecommon
copying pifacecommon/asm_generic_ioctl.py -> build/lib/pifacecommon
copying pifacecommon/interrupts.py -> build/lib/pifacecommon
copying pifacecommon/core.py -> build/lib/pifacecommon
running install_lib
copying build/lib/pifacecommon/init.py -> /usr/local/lib/python3.2/dist-packages/pifacecommon
copying build/lib/pifacecommon/asm_generic_ioctl.py -> /usr/local/lib/python3.2/dist-packages/pifacecommon
copying build/lib/pifacecommon/interrupts.py -> /usr/local/lib/python3.2/dist-packages/pifacecommon
copying build/lib/pifacecommon/core.py -> /usr/local/lib/python3.2/dist-packages/pifacecommon
byte-compiling /usr/local/lib/python3.2/dist-packages/pifacecommon/init.py to init.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/pifacecommon/asm_generic_ioctl.py to asm_generic_ioctl.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/pifacecommon/interrupts.py to interrupts.cpython-32.pyc
byte-compiling /usr/local/lib/python3.2/dist-packages/pifacecommon/core.py to core.cpython-32.pyc
running install_egg_info
Removing /usr/local/lib/python3.2/dist-packages/pifacecommon-1.1.egg-info
Writing /usr/local/lib/python3.2/dist-packages/pifacecommon-1.1.egg-info
Done!
from pifacecommon.
Ah, I fixed that on my local copy but I haven't updated it. Everything seems to work for me but since I don't really know how to replicate the error your in a better position to test it. I'll upload my changes to the testing branch in merge it into master by the end of the week if all goes well.
from pifacecommon.
I do not have error with the last fix.
Thanks
from pifacecommon.
Related Issues (20)
- Deregister a pin from an event listener
- Import of errno is needed HOT 4
- spi.py OSError (9) Bad File Descriptor
- Documentation HOT 7
- Add a wait_for_edge() function HOT 3
- errno not imported in pifacecommon/interrupts.py HOT 1
- pifacecommon.interrupts references undefined Timeout exception HOT 1
- Version 4.1.2 available through PyPi HOT 1
- Thread detector & dispatcher are not daemon threads.... HOT 1
- Piface2 board not detected (Rpi3 B) HOT 8
- Wrong version used in latest release. HOT 3
- Please release new pifacecommon version 4.2.2 to get the fix for SPI speed setting HOT 3
- bring_gpio_interrupt_into_userspace fails on Debian Buster, Rpi3B / 3B+
- E: Unable to locate package python-pifacecommon E: Unable to locate package python3-pifacecommon
- IOError: [Errno 2] No such file or directory: '/sys/devices/virtual/gpio/gpio25/value' HOT 1
- pip install fails HOT 3
- Upgrade to 4.0 has UnboundLocalError in deinit HOT 4
- SPI device error HOT 18
- Interrupt flag not cleared on mcp when interrupt handler start HOT 1
- SPI Device not found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pifacecommon.