Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module 'gpiod' has no attribute 'Line'. Did you mean: 'line'? #69

Open
raboof opened this issue Oct 27, 2023 · 1 comment
Open

module 'gpiod' has no attribute 'Line'. Did you mean: 'line'? #69

raboof opened this issue Oct 27, 2023 · 1 comment

Comments

@raboof
Copy link

raboof commented Oct 27, 2023

On NixOS, there seems to be a mismatch between RPi.GPIO2 and the gpiod bindings. I'm not yet sure whether this is an upstream issue or an issue in the NixOS packaging, but I thought I'd mention it here at least ;)

>>> from RPi import GPIO
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nix/store/vdfycwbxj5704a2s6mcfg94f73wpqgjj-python3-3.11.5-env/lib/python3.11/site-packages/RPi/GPIO/__init__.py", line 8, in <module>
    from RPi.core import\
  File "/nix/store/vdfycwbxj5704a2s6mcfg94f73wpqgjj-python3-3.11.5-env/lib/python3.11/site-packages/RPi/core.py", line 59, in <module>
    LOW  = gpiod.Line.ACTIVE_LOW
           ^^^^^^^^^^
AttributeError: module 'gpiod' has no attribute 'Line'. Did you mean: 'line'?

NixOS/nixpkgs#263759

Looks like the API just completely changed between libgpiod 1.x and 2.x

@crobison-ut
Copy link

For what it's worth, I'm also experiencing this same issue in Fedora 40.

RPi.GPIO2 0.4.0, gpiod 2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants