Open Annahcj opened 3 months ago
Hey there @Annahcj! Nice to see you back. Hope all is well on your end.
Thank you for providing detailed information about the issue you're encountering. The error message you're seeing is typically indicative of a change in the structure of the response from YouTube's API. This could mean that the transcriptBodyRenderer
property, which the YoutubeLoader
feature in LangChain expects to find, is no longer present in the same location within the response object.
Given that the error is likely within the dependencies (youtube-transcript
or youtubei.js
), here are some steps you can take to troubleshoot and potentially resolve the issue:
Check for Updates: Make sure that all dependencies are up to date. If there have been changes to YouTube's API, it's possible that these libraries have already released updates to accommodate these changes.
Review Dependency Documentation: Check the documentation for youtube-transcript
and youtubei.js
for any recent changes or updates that might be relevant to your issue. If YouTube's API has changed, these libraries may have updated their documentation to reflect these changes.
Inspect API Responses: If possible, add some logging to your code to inspect the raw API responses from YouTube. This can help you identify any changes in the structure of the response that might be causing your issue.
Adjust Code According to API Changes: If you identify changes in the API response structure, you may need to adjust your code to correctly handle these changes. This could involve changing how you access certain properties or handle the response data.
Contact Dependency Maintainers: If the issue persists and you're unable to resolve it based on the available documentation, consider reaching out to the maintainers of youtube-transcript
and youtubei.js
. They may be able to provide further guidance or updates on the issue.
Fallback to Alternative Methods: If the current dependencies do not quickly adapt to the API changes, consider using alternative methods or libraries for fetching YouTube transcripts and metadata as a temporary workaround.
I hope these steps help you in resolving the issue. If you have any further questions or need more assistance, feel free to ask.
Same issue here. youtube-transcript or youtubei.js just released a new version and they might change something in their API structure.
having the same issue
Same here
Same here
Having the same issue here as well.
For a temporary workaround until this is fixed upstream, you can:
npm i https://github.com/sinedied/youtube-transcript\#a10a073ac325b3b88018f321fa1bc5d62fa69b1c
This will use my fork that use a compatible drop-in code replacement from https://github.com/Kakulukian/youtube-transcript/issues/19, all the code credits goes to the folks there.
When the issue is fixed upstream, you can simply:
npm rm youtube-transcript
and it will return to the upstream version.
Same issue here with youtube-transcript
For a temporary workaround until this is fixed upstream, you can:
npm i https://github.com/sinedied/youtube-transcript\#a10a073ac325b3b88018f321fa1bc5d62fa69b1c
This will use my fork that use a compatible drop-in code replacement from Kakulukian/youtube-transcript#19, all the code credits goes to the folks there.
When the issue is fixed upstream, you can simply:
npm rm youtube-transcript
and it will return to the upstream version.
Thank you so much @sinedied , it worked.
For a temporary workaround until this is fixed upstream, you can:
npm i https://github.com/sinedied/youtube-transcript\#a10a073ac325b3b88018f321fa1bc5d62fa69b1c
This will use my fork that use a compatible drop-in code replacement from Kakulukian/youtube-transcript#19, all the code credits goes to the folks there.
When the issue is fixed upstream, you can simply:
npm rm youtube-transcript
and it will return to the upstream version.
Thank you.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
I'm using the
YoutubeLoader
from LangChain to load Youtube transcripts into documents. Getting this error with any youtube URL. This issue comes from the libraryyoutube-transcript
which is used under the hood - https://github.com/Kakulukian/youtube-transcript/issues/19 I believe Youtube's API has changedSystem Info
Platform: Mac Node version:
18.18.2
npm version:9.8.1
langchain:^0.1.31
youtube-transcript:^1.1.0
youtubei.js:^9.2.0