yusefnapora / pixelbook-linux

257 stars 50 forks source link

Python script not detecting inputs #55

Closed Elara6331 closed 4 years ago

Elara6331 commented 4 years ago

When running eve_audio_ctl.py, no devices are detected even though cras_test_client detects all devices. This is on a non-eve device and on debian, I am using CORAL/BRUCE. I have the kernel installed and the audio devices detected in cras_test_client, but not in eve_audio_ctl.py.

Elara6331 commented 4 years ago

I fixed it by changing the regex to "\s(([a-f0-9]+))\s+(\d+:\d+)\s+(\d+)\s+(\d.\d+)\s+(yes|no)\s+(yes|no)\s+(\d+)\s+([A-Z0-9_]+)\s(*?)([a-zA-Z0-9_ ]+)\s" and incrementing the group numbers by one from group 4. Guessing it has something to do with newer chromeos recovery image. Audio works perfectly. Thank you.

mcdowellmountains commented 4 years ago

AM6331,

replacing the regex with your string results in the following error. Is there a typo in the string you created? Here is the error I get. Can you provide any insight or help? thx!

ERROR! Syntax Error while loading YAML. found unknown escape character

The error appears to have been in '/home/john/pixelbook-linux-kernel-upgrade/ansible/roles/eve-recovery-files/tasks/main.yml': line 38, column 15, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

vars: regexp: "'\s(([a-f0-9]+))\s+(\d+:\d+)\s+(\d+)\s+(\d.\d+)\s+(yes|no)\s+(yes|no)\s+(\d+)\s+([A-Z0-9_]+)\s(?)'([a-zA-Z0-9_ ]+)\s*" ^ here This one looks easy to fix. It seems that there is a value started with a quote, and the YAML parser is expecting to see the line ended with the same kind of quote. For instance:

when: "ok" in result.stdout

Could be written as:

when: '"ok" in result.stdout'

Or equivalently:

when: "'ok' in result.stdout"

McDowellmountains

On Sat, May 9, 2020 at 12:47 AM AM6331 notifications@github.com wrote:

I fixed it by changing the regex to "\s(([a-f0-9]+))\s+(\d+:\d+)\s+(\d+)\s+(\d.\d+)\s+(yes|no)\s+(yes|no)\s+(\d+)\s+([A-Z0-9_]+)\s(?)([a-zA-Z0-9_ ]+)\s*" Guessing it has something to do with newer chromeos recovery image. Audio works perfectly. Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yusefnapora/pixelbook-linux/issues/55#issuecomment-626105484, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDBAIWXLNTMT5ZGEODEZADRQTN5VANCNFSM4M4T5L7A .

Elara6331 commented 4 years ago

No, I changed the regex in the parse function in eve-audio-ctl.py. This works if the command cras_test_client correctly shows all outputs, but running eve-audio-ctl.py shows no outputs at all. The issue is with an extra number being added to cras_test_client with the category UI.