question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Facebook video and special characters

See original GitHub issue

Checklist

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

Description

ERROR: unable to open for writing: [Errno 22] Invalid argument: 'C:\\youtube-dl\\facebook\\�.. _ Trường hợp này phải các cụ khi bật dạy có cho thanh niên kia một trận không , chơi kiểu này khác nào g.i.ê.t người �...-NA-NA-3214644252147296.f1023329444972024a.m4a.part'

i can still download with yt-dlp [link] [-o I:\1.mp4]

Verbose log

ERROR: unable to open for writing: [Errno 22] Invalid argument: 'I:\\youtube-dl\\facebook\\�... _ Trường hợp này phải các cụ khi bật dạy có cho thanh niên kia một trận không , chơi kiểu này khác nào g.i.ê.t người �...-NA-NA-3214644252147296.f1023329444972024a.m4a.part'
Traceback (most recent call last):
  File "C:\Users\GEN32UC\AppData\Local\Programs\Python\Python38\lib\site-packages\yt_dlp\utils.py", line 690, in sanitize_open
    raise LockingUnsupportedError()
yt_dlp.utils.LockingUnsupportedError: File locking is not supported on this platform

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\GEN32UC\AppData\Local\Programs\Python\Python38\lib\site-packages\yt_dlp\downloader\http.py", line 263, in download
    ctx.stream, ctx.tmpfilename = self.sanitize_open(
  File "C:\Users\GEN32UC\AppData\Local\Programs\Python\Python38\lib\site-packages\yt_dlp\downloader\common.py", line 221, in inner
    return func(self, *args, **kwargs)
  File "C:\Users\GEN32UC\AppData\Local\Programs\Python\Python38\lib\site-packages\yt_dlp\downloader\common.py", line 238, in sanitize_open
    f, filename = sanitize_open(filename, open_mode)
  File "C:\Users\GEN32UC\AppData\Local\Programs\Python\Python38\lib\site-packages\yt_dlp\utils.py", line 693, in sanitize_open
    stream = open(filename, open_mode)
OSError: [Errno 22] Invalid argument: 'I:\\youtube-dl\\facebook\\�... _ Trường hợp này phải các cụ khi bật dạy có cho thanh niên kia một trận không , chơi kiểu này khác nào g.i.ê.t người �...-NA-NA-3214644252147296.f1023329444972024a.m4a.part'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dirkfcommented, Apr 17, 2022

Isn’t this what --windows-filenames is for? Or --restrict-filenames if OP were actually using yt-dl as the directory name suggests.

0reactions
pukkandancommented, Apr 30, 2022

limiting the length of the overlong field, as in %(title).50s

Note that the actual limit is in bytes. If the title has unicode characters, .Ns may contain upto 2N bytes. To account for this, yt-dlp supports the syntax %(title).200B instead to trim to 200 bytes. This is recommended when trimming to limit path length

and trim do not seem to fix this

While the output template method is recommended, trim_file_name should also do the job. If it does not work, provide verbose log (preferably in a new issue)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Change Facebook Name With Special Characters ...
How to Change Facebook Name With Special Characters (2022)In this video I'll show you how to change facebook name in fancy fonts.
Read more >
Facebook Name Error - Special Characters & Requirements
Facebook limits the types of characters, words, and letters you use when you change your name on the app. This prevents things like ......
Read more >
How to Change Facebook Name With Special Character
Your browser can't play this video. Learn more. Switch camera.
Read more >
How to insert special characters into a Facebook post
To insert a special character into a Facebook comment or update, you have to right-click in the text field and select Special Characters,...
Read more >
Social Media Special Characters - All Stages Marketing
Social Media Special Characters. Use these social media symbols and special characters to spice up your tweets, wall posts or status updates! Most...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found