Git Product home page Git Product logo

Comments (5)

tompreston avatar tompreston commented on June 20, 2024

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.

tompreston avatar tompreston commented on June 20, 2024

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.

pmermoz avatar pmermoz commented on June 20, 2024

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.

tompreston avatar tompreston commented on June 20, 2024

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.

pmermoz avatar pmermoz commented on June 20, 2024

I do not have error with the last fix.
Thanks

from pifacecommon.

Related Issues (20)

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.