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

File not found: /sys/class/leds/default-on/device/uevent #55

Closed
Richard-Gemmell opened this issue Aug 14, 2021 · 4 comments
Closed

File not found: /sys/class/leds/default-on/device/uevent #55

Richard-Gemmell opened this issue Aug 14, 2021 · 4 comments
Labels

Comments

@Richard-Gemmell
Copy link

Hi,

First of all, thanks very much for providing this library. It made it much, much easier for me to get going in PiWars.

I updated the packages on my Pi recently and I now get this error when my controller connects:

  File "/usr/local/lib/python3.7/dist-packages/approxeng/input/selectbinder.py", line 131, in bind_controllers
    sys.scan_cache(force_update=True)
  File "/usr/local/lib/python3.7/dist-packages/approxeng/input/sys.py", line 23, in scan_cache
    __CACHED_SCAN__ = scan_system()
  File "/usr/local/lib/python3.7/dist-packages/approxeng/input/sys.py", line 126, in scan_system
    device_id = find_device_hardware_id(sub + '/device/uevent')
  File "/usr/local/lib/python3.7/dist-packages/approxeng/input/sys.py", line 107, in find_device_hardware_id
    for line in open(uevent_file_path, 'r').read().split('\n'):
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/leds/default-on/device/uevent'

The problem is that /sys/class/leds/default-on/ doesn't contain a device directory.

Catching the file not found exception like this fixes the issue:
f0633b3

Is this a problem with my Pi?

cheers,
Richard (Team Gremlin)

@tomoinn
Copy link
Member

tomoinn commented Aug 17, 2021

Hi Richard,

What controller are you using? Sounds like a library bug rather than a Pi issue, I'm curious where that 'default-on' is coming from though. Will have a dig and get back to you.

@tomoinn tomoinn added the bug label Aug 17, 2021
@tomoinn
Copy link
Member

tomoinn commented Aug 17, 2021

Ah, this is fixed in #39 I just haven't done a release since that point. Thanks for reminding me!

@tomoinn
Copy link
Member

tomoinn commented Aug 17, 2021

I've pushed 2.6.3 which includes this change, should be fine now hopefully if you do a pip install --upgrade

@tomoinn tomoinn closed this as completed Aug 17, 2021
@Richard-Gemmell
Copy link
Author

That works. Thanks very much.

I upgraded PyYAML which took it to 5.4.1. It complained that approxeng.input requires 5.4 but it seems Ok to far.

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

No branches or pull requests

2 participants