0

I am trying to use yt_dlp on python, and wanting to check out all the function for yt_dlp.YoutubeDL. help(yt_dlp.YoutubeDL) just didn't work.

Below is the error message:

  File "c:\Users\user\Desktop\youtube playlist downloader\playlist_dowloader.py", line 56, in <module>
    main()
  File "c:\Users\user\Desktop\youtube playlist downloader\playlist_dowloader.py", line 49, in main
    help(yt_dlp.YoutubeDL)
  File "C:\Python310\lib\_sitebuiltins.py", line 103, in __call__
    return pydoc.help(*args, **kwds)
  File "C:\Python310\lib\pydoc.py", line 2006, in __call__
    self.help(request)
  File "C:\Python310\lib\pydoc.py", line 2065, in help
    else: doc(request, 'Help on %s:', output=self._output)
  File "C:\Python310\lib\pydoc.py", line 1785, in doc
    pager(render_doc(thing, title, forceload))
  File "C:\Python310\lib\pydoc.py", line 1778, in render_doc
    return title % desc + '\n\n' + renderer.document(object, name)
  File "C:\Python310\lib\pydoc.py", line 477, in document
    if _isclass(object): return self.docclass(*args)
  File "C:\Python310\lib\pydoc.py", line 1415, in docclass
    for name, kind, cls, value in classify_class_attrs(object)
  File "C:\Python310\lib\pydoc.py", line 300, in classify_class_attrs
    for (name, kind, cls, value) in inspect.classify_class_attrs(object):
  File "C:\Python310\lib\inspect.py", line 554, in classify_class_attrs
    homecls = getattr(get_obj, "__objclass__", homecls)
  File "C:\Python310\lib\site-packages\yt_dlp\utils.py", line 5333, in __getattr__
    return self._dict[attr]
KeyError: '__objclass__'
work
  • 33
  • 1
  • 9
  • 2
    That's a bug in the library, you may wish to [report the issue](https://github.com/yt-dlp/yt-dlp/issues) at their issue tracker. – metatoaster Jun 16 '22 at 05:50
  • 1
    I doubt they'll do much to fix this, since OP can just inspect the source by hand. `help()` is just a convenience. – AKX Jun 16 '22 at 07:03
  • 1
    It would actually be a great exercise to find out what is causing this and try to fix it, and submit a PR to the library. – Alexander Jun 16 '22 at 07:05
  • Ok, I have went to the module folder and find a `options.py` that seems to have all the help context. I haven't have much experience into python, so I doubt I can fix the issue for them. I just submit a issue to their github to see if that actually is a bug. Thanks for quick replies everyone :) – work Jun 16 '22 at 07:45

0 Answers0