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

SyntaxError('Invalid filter specification #4741

Closed
8 tasks done
levaculik2 opened this issue Aug 22, 2022 · 4 comments
Closed
8 tasks done

SyntaxError('Invalid filter specification #4741

levaculik2 opened this issue Aug 22, 2022 · 4 comments
Labels
bug Bug that is not site-specific

Comments

@levaculik2
Copy link

levaculik2 commented Aug 22, 2022

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

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

Checklist

  • I'm asking a question and not reporting a bug or requesting a feature
  • I've looked through the README
  • I've verified that I'm running yt-dlp version 2022.08.19 (update instructions) or later (specify commit)
  • I've searched the bugtracker for similar questions including closed ones. DO NOT post duplicates
  • I've read the guidelines for opening an issue

Please make sure the question is worded well enough to be understood

when I try to download the audio [language=portuguese (Brazil)] and it's giving this error.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-v', '--audio-multistreams', '-f', 'bv[height=234]+ba[language=japanese]+ba[language=portuguese (Brazil)]', '-a', '/home/levaculik/Documentos/list/list.txt', '--all-subs', '--embed-subs', '--cookies', '/home/levaculik/Documentos/cookies/funimation.txt', '--no-geo-bypass', '--no-check-certificate', '--external-downloader', 'aria2c']
[debug] Batch file urls: ['https://www.funimation.com/v/overlord/two-venturers']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.08.08 [3157158] (source)
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Git HEAD: df2a5633d
[debug] Python 3.8.10 (CPython 64bit) - Linux-5.4.0-124-generic-x86_64-with-glibc2.29 (glibc 2.31)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.2.7, ffprobe 4.2.7
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, secretstorage-2.3.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
Traceback (most recent call last):
  File "/home/levaculik/tools/yt-dlp/yt_dlp/__main__.py", line 17, in <module>
    yt_dlp.main()
  File "/home/levaculik/tools/yt-dlp/yt_dlp/__init__.py", line 953, in main
    _exit(*variadic(_real_main(argv)))
  File "/home/levaculik/tools/yt-dlp/yt_dlp/__init__.py", line 915, in _real_main
    with YoutubeDL(ydl_opts) as ydl:
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 693, in __init__
    else self.build_format_selector(self.params['format']))
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2282, in build_format_selector
    return _build_selector_function(parsed_selector)
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2149, in _build_selector_function
    fs = [_build_selector_function(s) for s in selector]
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2149, in <listcomp>
    fs = [_build_selector_function(s) for s in selector]
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2170, in _build_selector_function
    selector_1, selector_2 = map(_build_selector_function, selector.selector)
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2149, in _build_selector_function
    fs = [_build_selector_function(s) for s in selector]
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2149, in <listcomp>
    fs = [_build_selector_function(s) for s in selector]
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2170, in _build_selector_function
    selector_1, selector_2 = map(_build_selector_function, selector.selector)
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2149, in _build_selector_function
    fs = [_build_selector_function(s) for s in selector]
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2149, in <listcomp>
    fs = [_build_selector_function(s) for s in selector]
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2246, in _build_selector_function
    filters = [self._build_format_filter(f) for f in selector.filters]
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 2246, in <listcomp>
    filters = [self._build_format_filter(f) for f in selector.filters]
  File "/home/levaculik/tools/yt-dlp/yt_dlp/YoutubeDL.py", line 1898, in _build_format_filter
    raise SyntaxError('Invalid filter specification %r' % filter_spec)
SyntaxError: Invalid filter specification 'language=portuguese(Brazil)'
@levaculik2 levaculik2 added the question Question label Aug 22, 2022
@pukkandan
Copy link
Member

Workaround: Use language^=portuguese

@pukkandan pukkandan added bug Bug that is not site-specific and removed question Question labels Aug 22, 2022
@levaculik2

This comment was marked as resolved.

@pukkandan
Copy link
Member

language^=portuguese, not language^=portuguese (brazil)

@levaculik2
Copy link
Author

language^=portuguese, not language^=portuguese (brazil)

once again thank you very much pukkandan it worked.

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
Projects
Status: format selection
Development

No branches or pull requests

2 participants