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

YouTubeTools working fine on local machine but not working on aws ec2 or azure #1756

Open
orbimatrix opened this issue Jan 10, 2025 · 3 comments

Comments

@orbimatrix
Copy link

Hi team,

I'm trying to make the fast api to extract summaries and key point from just giving the URL but I ran into problem where the below same code is working fine on my local machine ( windows) but when I deploy for Production on AWS Ec2 or lambda as well as Azure it gives me following response:

image

On the Local machine same code is giving me ouput:

image

Pls, note same versions of libraries are installed on both clouds and in local.


from phi.model.groq import Groq
from phi.agent import Agent
from phi.tools.youtube_tools import YouTubeTools

agent = Agent(
    tools=[YouTubeTools(get_video_captions=True)],
    show_tool_calls=True,
    model=Groq(id="llama3-70b-8192"),

    description="You are a YouTube agent. Obtain the captions of a YouTube video",
)

agent.print_response("Give me a ""well researched report"" and includes ""important key points"" as well as a ""seprate summary"" covered in this video https://www.youtube.com/watch?v=Iv9dewmcFbs&t", markdown=True)

I just deep dug in and find that you are also using 'youtube_transcript_api' and YouTube ban's the cloud machine IP's when try to extract captions. Pls help me to fix this problem as I'm stuck on this from 4 Days tried with proxies also but still the error comes.

@orbimatrix
Copy link
Author

  • The captions are enabled for the video and I tried with 10 different videos they are working fine on local host but on Cloud services they can't able to get results.

@orbimatrix
Copy link
Author

I follow this GitHub discussion but still the problem remains same.

youtube_transcript_api issue

Pls provide me some solution so I can use in production.

@ysolanky
Copy link
Contributor

Hey @orbimatrix unfortunately we faced the same problem while trying to deploy an Agent with YoutubeTools. Thank you for sharing the existing issue. I too am now subscribed to it. Hoping for a fix soon

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