You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to use YoutubeVideoSearchTool with a specific YouTube video URL, a PytubeError occurs. This error is raised by pytube while trying to access the video title. The error message suggests a missing videoDetails field in the YouTube response, which causes a KeyError. This issue may be related to recent changes in YouTube’s data structure or a limitation within pytube.
Steps to Reproduce
I used the following code to initiate a YoutubeVideoSearchTool instance with a specified YouTube video URL:
When this code runs, it raises a PytubeError with a KeyError: 'videoDetails', which prevents YoutubeVideoSearchTool from working with this video.
Error Message
PytubeError: Exception while accessing title of https://youtube.com/watch?v=FD-yp57VbmQ. Please file a bug report at https://github.com/pytube/pytube
Traceback:
File "path_to_crewai_tools/youtube_video_search_tool.py", line XX, in __init__
self.add(youtube_video_url)
File "path_to_pytube/__main__.py", line 346, in title
self._title = self.vid_info['videoDetails']['title']
KeyError: 'videoDetails'
Environment
crewai version: 0.51.1
pytube version: 15.0.0
Python version: 3.11.9
Operating System: macOS Sequoia 15.1
Expected behavior
YoutubeVideoSearchTool should retrieve information from the specified YouTube video URL without errors.
Screenshots/Code snippets
None
Operating System
Other (specify in additional context)
Python Version
3.11
crewAI Version
0.51.1
crewAI Tools Version
0.8.3
Virtual Environment
Venv
Evidence
PytubeError: Exception while accessing title of https://youtube.com/watch?v=example. Please file a bug report at https://github.com/pytube/pytube
Traceback:
File "path_to_crewai_tools/youtube_video_search_tool.py", line XX, in init
self.add(youtube_video_url)
File "path_to_pytube/main.py", line 346, in title
self._title = self.vid_info['videoDetails']['title']
KeyError: 'videoDetails'
Possible Solution
None
Additional context
None
The text was updated successfully, but these errors were encountered:
Description
Summary
When attempting to use
YoutubeVideoSearchTool
with a specific YouTube video URL, aPytubeError
occurs. This error is raised bypytube
while trying to access the video title. The error message suggests a missingvideoDetails
field in the YouTube response, which causes aKeyError
. This issue may be related to recent changes in YouTube’s data structure or a limitation withinpytube
.Steps to Reproduce
YoutubeVideoSearchTool
instance with a specified YouTube video URL:PytubeError
with aKeyError: 'videoDetails'
, which preventsYoutubeVideoSearchTool
from working with this video.Error Message
Environment
crewai
version: 0.51.1pytube
version: 15.0.0Expected behavior
YoutubeVideoSearchTool
should retrieve information from the specified YouTube video URL without errors.Screenshots/Code snippets
None
Operating System
Other (specify in additional context)
Python Version
3.11
crewAI Version
0.51.1
crewAI Tools Version
0.8.3
Virtual Environment
Venv
Evidence
PytubeError: Exception while accessing title of https://youtube.com/watch?v=example. Please file a bug report at https://github.com/pytube/pytube
Traceback:
File "path_to_crewai_tools/youtube_video_search_tool.py", line XX, in init
self.add(youtube_video_url)
File "path_to_pytube/main.py", line 346, in title
self._title = self.vid_info['videoDetails']['title']
KeyError: 'videoDetails'
Possible Solution
None
Additional context
None
The text was updated successfully, but these errors were encountered: