Skip to content

ERROR: unable to download video data: HTTP Error 403: Forbidden #1557

Description

@MatthK

For the last 10 days or so, I am unable to download anything in TubeSync.

I checked the issues here, and I tried placing the cookies.txt file, and also switched from a single TubeSync container to one with docker compose to include the bgutil-pot. However, the problem still persists.

When I try to download some content, it errors out saying it's forbidden.

Below are some of the log files to show the problem. Is there anything I can do to get this unblocked? Or is this just Google playing difficult?

sync.youtube.YouTubeError: Failed to download for "https://www.youtube.com/watch?v=ZOa1E3efdYM": ERROR: unable to download video data: HTTP Error 403: Forbidden

2026-08-19 14:38:26,708 [tubesync/INFO] waiting for errors: 429 (00:00:00): 466I6FGwPi8

2026-08-19 14:38:26,801 [tubesync/INFO] Downloading media: 466I6FGwPi8 (UUID: 88617069-b556-4241-bcc3-f0437eabe03f) to: "/downloads/video/matth/blancolirio [UCphqjYZxxzjNbONVmY-0J7Q]/2026-08-14_blancolirio_cirrus-sr20-flying-california-to-hawaii-live_466I6FGwPi8_1080p-av1-mp4a.mkv"

2026-08-19 14:38:26,912 [tubesync/INFO] [youtube-dl] using cookies.txt from: /config/cookies.txt

2026-08-19 14:38:31,091 [tubesync/INFO] [SponsorBlock] started for: 466I6FGwPi8: Cirrus SR20 Flying California to Hawaii LIVE!

2026-08-19 14:38:31,099 [tubesync/INFO] [SponsorBlock] started for: 466I6FGwPi8: Cirrus SR20 Flying California to Hawaii LIVE!

2026-08-19 14:38:31,631 [tubesync/INFO] [SponsorBlock] finished for: 466I6FGwPi8: Cirrus SR20 Flying California to Hawaii LIVE!

2026-08-19 14:38:31,644 [tubesync/INFO] [SponsorBlock] finished for: 466I6FGwPi8: Cirrus SR20 Flying California to Hawaii LIVE!

ERROR: unable to download video data: HTTP Error 403: Forbidden

[2026-08-19 14:43:23,548] ERROR:huey:355:MainThread:Unhandled exception in task 9c59a2c8-3887-4c4d-ab57-bd2e4164b156.

Traceback (most recent call last):

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 3571, in process_info

    partial_success, real_download = self.dl(fname, new_info)

                                     ~~~~~~~^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 3324, in dl

    return fd.download(name, new_info, subtitle)

           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/downloader/common.py", line 480, in download

    ret = self.real_download(filename, info_dict)

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/downloader/http.py", line 362, in real_download

    establish_connection()

    ~~~~~~~~~~~~~~~~~~~~^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/downloader/http.py", line 119, in establish_connection

    ctx.data = self.ydl.urlopen(request)

               ~~~~~~~~~~~~~~~~^^^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 4305, in urlopen

    return self._request_director.send(req)

           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/networking/common.py", line 117, in send

    response = handler.send(request)

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/networking/_helper.py", line 194, in wrapper

    return func(self, *args, **kwargs)

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/networking/common.py", line 359, in send

    return self._send(request)

           ~~~~~~~~~~^^^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/networking/_requests.py", line 361, in _send

    raise HTTPError(res, redirect_loop=max_redirects_exceeded)

yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/app/sync/youtube.py", line 458, in download_media

    return y.download([url])

           ~~~~~~~~~~^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 3715, in download

    self.__download_wrapper(self.extract_info)(

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

        url, force_generic_extractor=self.params.get('force_generic_extractor', False))

        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 3688, in wrapper

    res = func(*args, **kwargs)

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 1721, in extract_info

    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)

           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 1732, in wrapper

    return func(self, *args, **kwargs)

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 1888, in __extract_info

    return self.process_ie_result(ie_result, download, extra_info)

           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 1947, in process_ie_result

    ie_result = self.process_video_result(ie_result, download=download)

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 3135, in process_video_result

    self.process_info(new_info)

    ~~~~~~~~~~~~~~~~~^^^^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 195, in wrapper

    return func(self, *args, **kwargs)

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 3598, in process_info

    self.report_error(f'unable to download video data: {err}')

    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 1166, in report_error

    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)

    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.13/dist-packages/yt_dlp/YoutubeDL.py", line 1104, in trouble

    raise DownloadError(message, exc_info)

yt_dlp.utils.DownloadError: ERROR: unable to download video data: HTTP Error 403: Forbidden

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "/usr/local/lib/python3.13/dist-packages/huey/api.py", line 462, in _execute

    task_value = task.execute()

  File "/usr/local/lib/python3.13/dist-packages/huey/api.py", line 997, in execute

    return func(*args, **kwargs)

  File "/usr/local/lib/python3.13/dist-packages/django_huey/__init__.py", line 23, in inner

    return fn(*args, **kwargs)

  File "/app/sync/tasks.py", line 1066, in download_media_file

    format_str, container = media.download_media()

                            ~~~~~~~~~~~~~~~~~~~~^^

  File "/app/sync/models/media.py", line 1052, in download_media

    download_youtube_media(self.url, format_str, self.source.extension,

    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                           str(self.filepath), self.source.write_json,

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                           self.source.sponsorblock_categories.expand_choices, self.source.embed_thumbnail,

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                           self.source.embed_metadata, self.source.enable_sponsorblock,

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                          self.source.write_subtitles, self.source.auto_subtitles,self.source.sub_langs )

                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/app/sync/youtube.py", line 466, in download_media

    raise YouTubeError(f'Failed to download for "{url}": {e}') from e

sync.youtube.YouTubeError: Failed to download for "https://www.youtube.com/watch?v=466I6FGwPi8": ERROR: unable to download video data: HTTP Error 403: Forbidden

2026-08-19 14:43:23,774 [tubesync/INFO] waiting for errors: 429 (00:00:00): J1WoNuemKOg

2026-08-19 14:43:23,843 [tubesync/INFO] Downloading media: J1WoNuemKOg (UUID: 69140bc5-8831-40ce-b957-5c8bb19ded1a) to: "/downloads/video/matth/Veritasium/Veritasium [UCHnyfMqiRRG1u-2MsSQLbXA]/20260817 Total Solar Eclipse From Space [J1WoNuemKOg].mkv"

2026-08-19 14:43:23,979 [tubesync/INFO] [youtube-dl] using cookies.txt from: /config/cookies.txt

2026-08-19 14:43:27,932 [tubesync/INFO] [SponsorBlock] started for: J1WoNuemKOg: Total Solar Eclipse from 92,000 Feet

2026-08-19 14:43:27,948 [tubesync/INFO] [SponsorBlock] started for: J1WoNuemKOg: Total Solar Eclipse from 92,000 Feet

2026-08-19 14:43:28,214 [tubesync/INFO] [SponsorBlock] finished for: J1WoNuemKOg: Total Solar Eclipse from 92,000 Feet

2026-08-19 14:43:28,227 [tubesync/INFO] [SponsorBlock] finished for: J1WoNuemKOg: Total Solar Eclipse from 92,000 Feet

And this is my docker-compose.yml

networks:
  tubesync-net:
    driver: bridge
    ipam:
      config:
        - subnet: 172.20.15.0/24

services:
  bgutil-ytdlp-pot-service:
    image: brainicism/bgutil-ytdlp-pot-provider:1.3.1
    container_name: ts-bgutil-pot
    ports:
      - "4416:4416"
    networks:
      tubesync-net:
        ipv4_address: 172.20.15.100
    restart: unless-stopped

  tubesync:
    image: ghcr.io/meeb/tubesync:latest
    container_name: ts-tubesync
    environment:
      - TUBESYNC_POT_IPADDR=172.20.15.100
      - TUBESYNC_POT_PORT=4416
      - PUID=1026
      - GUID=100
      - DATABASE_CONNECTION=mysql://TubeSync:password@vs03.local.domain:3306/TubeSync
      - TZ=Asia/Hong_Kong
      - TUBESYNC_RESET_DOWNLOAD_DIR=False
    volumes:
      - type: bind
        source: /home/matth/docker/tubesync/TubeSync-config
        target: /config
      - type: bind
        source: /mnt/media/YouTube
        target: /downloads
    ports:
      - 4848:4848
    networks:
      - tubesync-net

Metadata

Metadata

Assignees

Labels

finishedWaiting for confirmation from the author before closingwaiting-on-authorMore details or answers are needed from the author of this issue

Projects

  • Status
    Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions