Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[extractor tests] AssertionError: {'filename'} is not false : Missing keys in test definition: filename #6967

Closed
9 of 10 tasks
elyse0 opened this issue May 2, 2023 · 1 comment
Assignees
Labels
bug Bug that is not site-specific patch-available There is patch available that should fix this issue. Someone needs to make a PR with it

Comments

@elyse0
Copy link
Contributor

elyse0 commented May 2, 2023

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

  • I'm reporting a bug unrelated to a specific site
  • I've verified that I'm running yt-dlp version 2023.03.04 (update instructions) or later (specify commit)
  • I've checked that all provided URLs are playable in a browser with the same IP and same login details
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I've read the guidelines for opening an issue

Provide a description that is worded well enough to be understood

I was making changes to the RadioFrance extractor and I wanted to run its tests to make sure it was working as expected, but running the test throws an AssertionError: {'filename'} is not false

It can be reproduced with other extractor tests, like YT

Maybe related to a change in 1706058

Command:

 python3 test/test_download.py TestDownload.test_Youtube

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

------------------
Running from source and up to date with master
------------------

[debug] Command-line config: ['--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (source)
[debug] Lazy loading extractors is disabled
[debug] Git HEAD: b079c26f0
[debug] Python 3.10.7 (CPython x86_64 64bit) - Linux-5.19.0-41-generic-x86_64-with-glibc2.36 (OpenSSL 3.0.5 5 Jul 2022, glibc 2.36)
[debug] exe versions: ffmpeg N-108931-g4dda3b1653-20221104 (setts), ffprobe N-108931-g4dda3b1653-20221104, phantomjs broken, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.15.0, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Extractor Plugins: ElyseNebulaChannelIE, ElyseNebulaIE, ElyseNebulaSubscriptionsIE, OnlineRadioBoxIE
[debug] Plugin directories: ['/home/amish/.yt-dlp/plugins/elyse0/yt_dlp_plugins']
[debug] Loaded 1812 extractors

Usage: yt-dlp [OPTIONS] URL [URL...]


------------------
Running YT test

python3 test/test_download.py TestDownload.test_Youtube
------------------

[debug] Loaded 1812 extractors
[youtube] Extracting URL: https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9
[youtube] BaW_jenozKc: Downloading webpage
[youtube] BaW_jenozKc: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] BaW_jenozKc: Downloading 1 format(s): 22
[info] Writing video metadata as JSON to: test_Youtube_BaW_jenozKc.info.json
[debug] Invoking http downloader on "https://rr8---sn-0opoxu-hxme6.googlevideo.com/videoplayback?expire=1683006587&ei=G1BQZKm-BKavlu8P24OH4AU&ip=xxx&id=o-AEDQ-ztp4w3r2EVxZo5bU6kvekNXCSmcR4DZP5V-RaE7&itag=22&source=youtube&requiressl=yes&mh=Rf&mm=31%2C26&mn=sn-0opoxu-hxme6%2Csn-q4fzen7s&ms=au%2Conr&mv=m&mvi=8&pl=21&initcwndbps=746250&spc=qEK7B1YjPXBT_cb5mtMCatikfyfsNVI&vprv=1&svpuc=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=9.891&lmt=1472250137564567&mt=1682984701&fvip=5&fexp=24007246&c=ANDROID&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIgEa-XyaloI5fKM976dHiNkHvnDV6txby0oj0p4Ea6afMCIQDrNP-ihY403jHoILiTqx4mvXLRN1nAtzNVH0SThLXppg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgHZrKJq2AtoEbiVuF2B4R4wEcbPpskNMdHB1yNVc6fUwCIQD5wGeA9oo1NEOjtuv33oPTajvv3_c-I-dh9aC918AdAQ%3D%3D"
[download] Destination: test_Youtube_BaW_jenozKc.mp4
[download] 100% of   10.00KiB in 00:00:00 at 12.34KiB/s

        'info_dict': {
            'id': 'BaW_jenozKc',
            'title': 'youtube-dl test video "\'/\\ä↭𝕐',
            'thumbnail': 'https://i.ytimg.com/vi/BaW_jenozKc/maxresdefault.jpg',
            'description': 'md5:8fb536f4877b8a7455c2ec23794dbc22',
            'channel_id': 'UCLqxVugv74EIW3VWh2NOa3Q',
            'channel_url': 'https://www.youtube.com/channel/UCLqxVugv74EIW3VWh2NOa3Q',
            'duration': 10,
            'view_count': int,
            'age_limit': 0,
            'categories': ['Science & Technology'],
            'tags': ['youtube-dl'],
            'playable_in_embed': True,
            'live_status': 'not_live',
            'start_time': 1.0,
            'end_time': 9.0,
            'comment_count': int,
            'like_count': int,
            'channel': 'Philipp Hagemeister',
            'channel_follower_count': int,
            'uploader': 'Philipp Hagemeister',
            'uploader_id': '@PhilippHagemeister',
            'uploader_url': 'https://www.youtube.com/@PhilippHagemeister',
            'upload_date': '20121002',
            'availability': 'public',
        
            'filename': 'test_Youtube_BaW_jenozKc.mp4',
        },
        F
======================================================================
FAIL: test_Youtube (__main__.TestDownload):
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/amish/Documents/Programming/yt-dlp/test/test_download.py", line 244, in test_template
    expect_info_dict(self, info_dict, tc.get('info_dict', {}))
  File "/home/amish/Documents/Programming/yt-dlp/test/helper.py", line 267, in expect_info_dict
    self.assertFalse(
AssertionError: {'filename'} is not false : Missing keys in test definition: filename

----------------------------------------------------------------------
Ran 1 test in 1.796s

FAILED (failures=1)
@elyse0 elyse0 added bug Bug that is not site-specific triage Untriaged issue labels May 2, 2023
@bashonly
Copy link
Member

bashonly commented May 2, 2023

until a patch is committed to master, you can apply this to run download tests

diff --git a/test/helper.py b/test/helper.py
index 0b90660ff..0d0c5743e 100644
--- a/test/helper.py
+++ b/test/helper.py
@@ -194,7 +194,7 @@ def sanitize_got_info_dict(got_dict):
         'formats', 'thumbnails', 'subtitles', 'automatic_captions', 'comments', 'entries',
 
         # Auto-generated
-        'autonumber', 'playlist', 'format_index', 'video_ext', 'audio_ext', 'duration_string', 'epoch',
+        'autonumber', 'playlist', 'format_index', 'video_ext', 'audio_ext', 'duration_string', 'epoch', 'filename',
         'fulltitle', 'extractor', 'extractor_key', 'filepath', 'infojson_filename', 'original_url', 'n_entries',
 
         # Only live_status needs to be checked

@bashonly bashonly added patch-available There is patch available that should fix this issue. Someone needs to make a PR with it and removed triage Untriaged issue labels May 2, 2023
@pukkandan pukkandan self-assigned this May 2, 2023
pukkandan added a commit that referenced this issue May 19, 2023
Closes #7030, closes #6967
stanoarn pushed a commit to stanoarn/yt-dlp that referenced this issue May 26, 2023
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this issue Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is not site-specific patch-available There is patch available that should fix this issue. Someone needs to make a PR with it
Projects
None yet
Development

No branches or pull requests

3 participants