Help to resolve youtube-dl error.

Hi. I get following error when run youtube-dl on my Thinkpad:
Code:
$ youtube-dl
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/bin/youtube-dl/__main__.py", line 14, in <module>
  File "/usr/local/bin/youtube-dl/yt_dlp/__init__.py", line 17, in <module>
  File "/usr/local/bin/youtube-dl/yt_dlp/cookies.py", line 33, in <module>
  File "/usr/local/bin/youtube-dl/yt_dlp/minicurses.py", line 4, in <module>
  File "/usr/local/bin/youtube-dl/yt_dlp/utils/__init__.py", line 8, in <module>
  File "/usr/local/bin/youtube-dl/yt_dlp/utils/traversal.py", line 14, in <module>
  File "/usr/local/bin/youtube-dl/yt_dlp/utils/_utils.py", line 16, in <module>
ModuleNotFoundError: No module named 'html'
$ uname -a
FreeBSD corebsd 15.0-RELEASE FreeBSD 15.0-RELEASE LAPTOP amd64
$ p nf yt-dlp
Name            : yt-dlp
Version         : 2026.03.17
Origin          : www/yt-dlp
Architecture    : FreeBSD:15:*
Prefix          : /usr/local
Maintainer      : yuri@FreeBSD.org
WWW             : https://github.com/yt-dlp/yt-dlp
Comment         : Command-line program for downloading videos from various platforms
Flat size       : 3.12MiB

Somebody has the same output?
 
check the github yt-dlp discussions. you'll get more relevant help there. They are pretty good about acknowledging and fixing problems quickly.

But for the record, you are missing one or more required modules...yt-dlp doesn't check your python installation to make sure all needed modules are present when you install.
 
py311-html3 seems like a likely package you might miss based on your error message.

However, I just installed yt-dlp on a machine that previously didn't have it and it works and it doesn't have py311-html3.

I'd say reinstall yt-dlp and see whether that makes a difference.
 
Back
Top