Menu

#165 This module can only be run on a Raspberry Pi!

Done
None
Critical
Defect
2019-07-21
2019-01-26
jg01
No

I'm unable to use this package on a Raspberry Pi running Gentoo.
System details:
Linux 4.20.1-v8+
Python 2.7.15 and 3.6.6
RPi.GPIO 0.6.5 and latest development version (reports version as 0.6.5)

All combinations of these fail with the same error (code below from Python 2.7 with development version):

>>> import RPi.GPIO as GPIO
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/.local/lib64/python2.7/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!

I've confirmed that I'm able to use the GPIO pins from the terminal, so they're functional.

Discussion

  • Dave Jones

    Dave Jones - 2019-01-31

    This is most likely a duplicate of #161 in that RPi.GPIO currently expects to find revision information under /proc/cpuinfo. On arm64 and other alternate kernels this information is only present in /proc/device-tree/system/linux,revision. I've posted a patch to fix this properly (with fallback to /proc/cpuinfo) under #161 but the comment is currently awaiting approval. Might see if I can dig out my mercurial skills in a bit and post it as a PR (or whatever SF's equivalent is).

     
    • jg01

      jg01 - 2019-02-02

      This worked great, I was able to import the module without any problems after patching it. Thanks.

       
  • Ben Croston

    Ben Croston - 2019-03-16

    The patch has been included and modified because it broke the detection of early boards. Could you please test the latest development copy on aarch64 and confirm that it works.
    The commands to install it will be something along the lines of:
    $ sudo apt install mercurial
    $ pip3 install --upgrade hg+http://hg.code.sf.net/p/raspberry-gpio-python/code#egg=RPi.GPIO

     
    • jg01

      jg01 - 2019-03-21

      I'm able to install and import the module, at least, so the original issue seems to have been fixed.
      I'll post an update when I've had a chance to test toggling output.

       
  • Ben Croston

    Ben Croston - 2019-07-21
    • status: New --> Done
    • assigned_to: Ben Croston
     
  • Ben Croston

    Ben Croston - 2019-07-21

    In release 0.7.0

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.