-
Notifications
You must be signed in to change notification settings - Fork 693
"KeyError: None" from check_audio.py with older Voice Kits #255
Comments
hi, the contents of my /proc/asound/cards file is as follows What does your's contain? If I do aplay -l I get The only entries you need to uncomment in the sound part of /boot/config.txt are dtoverlay=i2s-mmap |
Hi there, Thanks for the reply. Yes, /proc/asound/cards is the same as what you post: Similarly, As I say, the sound device seems to work; I can play the sample audio using aplay. The script is unhappy in Any suggestions appreciated! |
Hi, In my /proc/device-tree/hat there are 6 files Contents are (i've surrounded the contents in ' ') looked in /var/log/boot.log - nothing related and had a look at dmesg Have you tried just saving the credential files and then taking it apart/putting back together and reimaging? |
@CelloVerb I've seen this before, but only on a pre-production prototype Voice HAT, so I thought it wouldn't be seen with retail Voice Kits. The good news is that it doesn't seem to affect anything except check_audio.py, so you should hopefully be able to use your kit as normal. That said, we'd like to figure this out as it's probably affecting other users, and it's a very unclear error. Thanks for reporting it! If you have access to another Voice HAT, could you try swapping them out and letting us know if you still see the issue? |
PS. If you want to paste in multiline code samples, you can use three backticks like: |
I ran into this issue yesterday. I ended up modifying check_audio.py to just run check_speaker_works() and check_mic_works(). Both returned successfully and I haven't noticed any other issues. |
Ah, sure enough, after setting up credentials, etc., everything does seem to work fine. I don't have another HAT unfortunately, but I did have another Raspberry PI, which didn't have any different results, even with a fresh image. Nonetheless, everything else is working, so we're happy. Thanks for the tips. Cello P.S., Not sure if I should close the issue or not - sounds like others have seen this, and it might cause them to stumble, given that it's central in the setup instructions. |
Nope, let's leave it open - it may help others to see that this is a known problem (even if it's not a showstopper). |
I wanted to chime in and say I'm having the same problem . I've edited the config.txt that activated the sound drivers. |
You should just be able to ignore the error in Check Audio and continue with the instructions. |
Spent several hours trying to get this to work . |
@neorazz Glad you got your kit going. Could you clarify if the problem was just in Check Audio, or were the demo scripts also having problems? |
Nothing worked everything that accessed the aiy would crash with error Google didn't even have matches for . The main difference I see is on boot this image doesn't start with a clk error . I will try redownloaded the newest image on another sd card tonight and see if something was screwed up there . I've noticed if my TV isnt at the no signal before I power the rasberry I don't get any video That may have glitched the initial setup. Well see |
I have installed 20180103 image to a 16G SD card from https://aiyprojects.withgoogle.com/voice/ and having the same issue reported on #255. I am a newbie so will try the fixes describe in #255 & #261.
|
I'm sorry you're all having so much trouble with the 2018-01-03 image! We have tested it (indeed, I tested it with the Voice Kit myself) but the issues here seem to be related to different hardware versions, or to only show up occasionally, which is why I didn't find them before release. @neorazz If you can't find references to the error messages, please copy-paste them into a GitHub issue or post a screenshot, so that we can have a look and see if we can do anything about them. The 2018-01-03 image has quite a lot of changes (including a newer version of Raspbian and support for the Vision Kit) so it's possible that one of them is causing problems. @AlanJACarter Thanks for all the information. Regarding each issue:
|
@drigz - I had the same issue (hat not recognized by raspbian) with the new AIY image. Kernel modules failed to load on boot. The old AIY voice image works fine like @neorazz wrote. The old image is here for the people who don't want to wait for the resolution: https://dl.google.com/dl/aiyprojects/voice/aiyprojects-2017-09-11.img.xz |
Just wanted to say that I am having the exact same problem as everyone else with the 2018-01-03 image. One thing I did not see posted on this thread is that the contents of the /proc/asound/cards file shows "no soundcards". Hopefully this can help someone differentiate if they have a config error or a problem with the image. I'm going to try the old image in the hopes that it works for me. |
@rok - thanks for the link and I will drop back to the older image later today. @drigz - Some further feedback:
I did some further investigation which I will summarise below. Being a newbie I don't want to spam this forum so please let me know if there is too much detail: Both dwc2 and libcomposite are referenced in googadget.conf and seem to be missing. From syslog in /var/log... Jan 25 08:06:29 raspberrypi systemd-modules-load[114]: Failed to find module 'dwc2' From user.log Not sure if this is related to dwc2 and libcomposite In terms of hardware I have purchased the Raspberry Pi 3 a AIY audio board from UK distributors in the last two weeks. I collected the following hardware/kernel/bootloader information for my Pi while running the 2018-01-03 image: Raspberry Pi 3 Model B Rev 1.2 from file model under /proc/device-tree cat /proc/cpuinfo cat /etc/os-release uname -a vcgencmd version No version number that I can see on the HAT AIY audio board. If it will help I would be happy to try a new image on my setup once a fix has been found. |
For what it's worth, I get the same message about those two same modules failing to load. It doesn't seem to be impacting the operation of the Pi, though. I'm on image 01_03 running on a Pi3 and a kit I bought on early ship late last year. Is there a serial number on the voice hat boards we can lookup or some other way of identifying if this is an EEPROM problem with particular boards? |
@LondonSi72 and others thanks for the help/advice. Flashed the 9-11-17 image and have run Check Audio script no problem - nice to hear my own voice :). Given that I would suspect the 2018-01-03 image rather than HAT hardware/EEPROM but it wouldn't be the first time I was wrong. |
Just as a followup, flashing to an earlier image worked. So clearly there's am issue with the 2018-01-03 image. |
Just thought I would add to this, Installed the 9-11-17 image and everything worked fine. |
Where did you find the older (9-11-17) image? |
?? is this because the image referenced in the VOICE docs https://dl.google.com/dl/aiyprojects/vision/aiyprojects-2018-01-03.img.xz Dave |
@dbuggz, even though the URL says "vision", that image should work with the Voice Kit if you apply the workaround I added to the issue description. If you prefer to use the older image, you can get it here: https://dl.google.com/dl/aiyprojects/voice/aiyprojects-2017-09-11.img.xz |
@drigz, I'll do the older image first, just to prove the Hardware. Later, yes the older image is working. |
sorry @dbuggz, I can't remember now... But I did google it and i think i found it on the Raspberian Pi forums. |
@drigz thank you for your workaround. It really helps, I have just run one example and it worked fine. But I still have issue with pi@raspberrypi:~ $ systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules
Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-02-07 00:30:29 UTC; 13min ago
Docs: man:systemd-modules-load.service(8)
man:modules-load.d(5)
Process: 346 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
Main PID: 346 (code=exited, status=1/FAILURE)
Feb 07 00:30:29 raspberrypi systemd[1]: Starting Load Kernel Modules...
Feb 07 00:30:29 raspberrypi systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Feb 07 00:30:29 raspberrypi systemd[1]: Failed to start Load Kernel Modules.
Feb 07 00:30:29 raspberrypi systemd[1]: systemd-modules-load.service: Unit entered failed state.
Feb 07 00:30:29 raspberrypi systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'. I'm using:
Hope you will find the way to fix this problem. |
@hyzhak Are you having any problems as a result of the "Load Kernel Modules" service, or are you just concerned about the error? The Voice Kit should work fine: the error comes up because it's trying to load a module that is only available on the Pi Zero, but isn't needed by the Voice Kit. |
@drigz ok, I see. If |
Hi there,
Using the 2018-01-03 image and the voice hat, I get the following error with the check_audio.py script:
Digging into the calls, the problem is that
get_aiy_device_name()
returns None, which is because there's no /proc/device-tree/hat device running. I've run the configure-driver.sh script, and the right things seem to be enabled in /boot/config.txt. Also, I can play audio through the speaker using the alsa driver and aplay, so the voice hat is working it seems.Any suggestions?
Many thanks,
Cello
Workaround
Run the following commands to enable the audio driver. Check Audio will still fail, but the demos should work normally:
In the text editor, find the lines:
and uncomment them (remove the
#
s) to give:The text was updated successfully, but these errors were encountered: