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

YouTube Exception Error #949

Open
GeekTeacher opened this issue Aug 4, 2019 · 12 comments
Open

YouTube Exception Error #949

GeekTeacher opened this issue Aug 4, 2019 · 12 comments

Comments

@GeekTeacher
Copy link

GeekTeacher commented Aug 4, 2019

IMPORTANT NOTICE
If you do not complete the template below it is likely that your issue will not be addressed. When providing information about your issue please be as extensive as possible so that it can be solved by as little as possible responses.

FAILURE TO COMPLETE THE REQUESTED INFORMATION WILL RESULT IN YOUR ISSUE BEING CLOSED

Board and OS details:

Open a terminal and run

processor	: 0
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 38.40
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 1
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 38.40
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 2
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 38.40
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

processor	: 3
model name	: ARMv7 Processor rev 4 (v7l)
BogoMIPS	: 38.40
Features	: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32 
CPU implementer	: 0x41
CPU architecture: 7
CPU variant	: 0x0
CPU part	: 0xd03
CPU revision	: 4

Hardware	: BCM2835
Revision	: a020d3
Serial		: 00000000eacd4d62

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Describe the bug:

Google Assistant installed and working fine. Trying to play music from YouTube using info from 'Instructables' website. Got as far as number 7. in 'Music Streaming from YouTube' section. Don't understand ' In the API window, click on 'All API Credentials' ... etc.  Can't find this dropdown. 

Entered API key in actions.py script - when Play from YouTube command spoken says 'Getting YouTube Link' and then stops with a 'encountered an execption, please check the logs'.  Can't find the logs in /tmp. 

Did you go through or search the issues section to check if your issue was already discussed (either currently open issues or closed issues).

Yes

2. Is the issue related to assistant installation ?

No, not really.

If answer to question 2 is Yes, then paste the contents of the terminal below.


If answer to question 2 is No, then proceed further.

3. Does the assistant service start normally?

Yes

4. Is the assistant service restarting automatically?

No

If answer to question 4 is Yes, then paste the contents of the terminal below.


If answer to question 4 is No, then proceed further.

Manually start the assistant. For guidelines to start the assistant manually refer this

Paste the command below, that crashed the assistant


Paste the contents of the terminal below


Attach the log file named Gassistpi.log

Log file can be found in /tmp/ directory

@GeekTeacher GeekTeacher changed the title YouTube YouTube Exception Error Aug 4, 2019
@shivasiddharth
Copy link
Owner

There is no place in actions script to enter the API. You have got all the instructions wrong. Go through the latest set of instructions.

@GeekTeacher
Copy link
Author

GeekTeacher commented Aug 4, 2019

These are YOUR instructions on https://www.instructables.com/id/Google-Assistant-on-Pi-for-Home-Automation-and-Ent/ - I refer you to point number 5 where it clearly says:

5. Click on create credentials and select API Key and choose close. Make a note of the created API Key and enter it in the actions.py script at the indicated location.

It's point number 7 that I don't see how to do (see full list below).

But the main issue is that YouTube is not playing music when Play from YouTube command spoken. GA says 'Getting YouTube Link' and then stops with a 'encountered an exception, please check the logs'.

Please help me sort this.

Here's the full list of points which I am following from Instructibles.com

Adding YouTube API and Generating API Key

  1. Go to the projects page on your Google Cloud Console-> https://console.cloud.google.com/project

  2. Select your project from the list.

  3. On the left top corner, click on the hamburger icon or three horizontal stacked lines.

  4. Move your mouse pointer over "API and services" and choose "credentials".

5. Click on create credentials and select API Key and choose close. Make a note of the created API Key and enter it in the actions.py script at the indicated location.

  1. "From the API and services" option, select library and in the search bar type youtube, select "YouTube Data API v3" API and click on "ENABLE".

  2. In the API window, click on "All API Credentials" and in the drop down, make sure to have a tick (check mark) against the API Key that you just generated.

Default keyword for playing music from YouTube without autoplay is Stream.

For example, Stream I got you command will fetch Bebe Rexha's I Got You from YouTube.

Default keyword for playing music from YouTube with autoplay is Autoplay and Stream.

For example, Autoplay and Stream I got you command will play the requested I Got You and after the end of the track will autoplay susequent tracks. The number of autoplay tracks has been limited to a maximum of 10. this can be changed the under the YouTube_Autoplay function in the actions.py script.

@GeekTeacher
Copy link
Author

If this is no longer the correct set of instructions for adding YouTube functionality to your implementation of Google Assistant on a Raspberry Pi, please could you send me a link to the correct ones. Thank-you.

@shivasiddharth
Copy link
Owner

I have got this project listed in a number of sites (hackster, instructables, etc) as the project advances, it is humanly impossible to go back and makes changes in each and every post/site. That is why i ask people to follow the README which always has the up to date instruction.

@GeekTeacher
Copy link
Author

GeekTeacher commented Aug 4, 2019 via email

@shivasiddharth shivasiddharth reopened this Aug 4, 2019
@shivasiddharth
Copy link
Owner

Can you manually run the assistant and share the terminal contents here. I will do my best to assist.

@GeekTeacher
Copy link
Author

GeekTeacher commented Aug 4, 2019 via email

@GeekTeacher
Copy link
Author

GeekTeacher commented Aug 4, 2019 via email

@shivasiddharth
Copy link
Owner

Your syntax for the youtube command is wrong. Can you get the correct syntax from here https://gassistpi.blogspot.com/p/how-to-use-customizations.html and then try

@GeekTeacher
Copy link
Author

GeekTeacher commented Aug 5, 2019 via email

@scientificpraveen
Copy link

Your syntax for the youtube command is wrong. Can you get the correct syntax from here https://gassistpi.blogspot.com/p/how-to-use-customizations.html and then try

I am getting this error

<HttpError 403 when requesting https://youtube.googleapis.com/youtube/v3/search?q=faded&part=id%2Csnippet&key=AIzaSyDmpLwvE5xdtdxoIM1qa7FJGPNDEXKUGBI&alt=json returned "The request cannot be completed because you have exceeded your quota.". Details: "The request cannot be completed because you have exceeded your quota.">

I checked the quota in cloud platform and it says

YouTube Data API v3 | Queries per 100 seconds | One quota is within limit

Limit:3,000,000Current usage: 0(0%)
7 days peak: 0(0%)

@Phil-MC
Copy link

Phil-MC commented May 2, 2021

I am also getting this error when trying to ask for a song from Youtube
I tried increasing my quota from 0 on the Google Project page but the system would not have it as I don't have a billing address. Which is not surprising!

Here is an extract from the syslog.

May 2 15:29:33 SlideShow python[480]: congratulations
May 2 15:29:33 SlideShow python[480]: <HttpError 403 when requesting https://youtube.googleapis.com/youtube/v3/search?q=congratulations&part=id%2Csnippet&key=AIzaSyDTz5Wx9p33zezQ2HxT5qwndYBg_w1eCg4&alt=json returned "The request cannot be completed because you have exceeded your quota.". Details: "[{'message': 'The request cannot be completed because you have exceeded your quota.', 'domain': 'youtube.quota', 'reason': 'quotaExceeded'}]">

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

4 participants