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

WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this. #21057

Closed
itskando opened this issue May 11, 2019 · 4 comments

Comments

@itskando
Copy link

@itskando itskando commented May 11, 2019

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.05.11
  • 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 bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

root@plex:~ # python3 /usr/local/bin/youtube-dl --update
WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
Updating to version 2019.05.11 ...
Updated youtube-dl. Restart youtube-dl to use the new version.
root@plex:~ # python3 /usr/local/bin/youtube-dl --version
2019.05.11
root@plex:~ # python3 /usr/local/bin/youtube-dl "https://vimeo.com/133021237" -v 
[debug] System config: ['--add-metadata', '--embed-thumbnail', '-o', '/media/movies/youtube-dl/%(title)s.%(ext)s']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://vimeo.com/133021237', '-v']
WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
[debug] Encodings: locale US-ASCII, fs ascii, out US-ASCII, pref US-ASCII
[debug] youtube-dl version 2019.05.11
[debug] Python version 3.6.8 (CPython) - FreeBSD-11.2-STABLE-amd64-64bit-ELF
[debug] exe versions: ffmpeg 4.1.3, ffprobe 4.1.3
[debug] Proxy map: {}
[vimeo] 133021237: Downloading webpage
[vimeo] 133021237: Extracting information
[vimeo] 133021237: Downloading webpage
[vimeo] 133021237: Downloading JSON metadata
WARNING: Unable to download JSON metadata: HTTP Error 403: Forbidden
[vimeo] 133021237: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 133021237: Downloading fastly_skyfire m3u8 information
[vimeo] 133021237: Downloading akfire_interconnect_quic MPD information
[vimeo] 133021237: Downloading akfire_interconnect_quic MPD information
[vimeo] 133021237: Downloading fastly_skyfire MPD information
[vimeo] 133021237: Downloading fastly_skyfire MPD information
[debug] Default format spec: bestvideo+bestaudio/best
[vimeo] 133021237: Downloading thumbnail ...
[vimeo] 133021237: Writing thumbnail to: /media/movies/youtube-dl/WILDFIRE.jpg
[download] /media/movies/youtube-dl/WILDFIRE.mp4 has already been downloaded and merged
[ffmpeg] Adding metadata to '/media/movies/youtube-dl/WILDFIRE.mp4'
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i file:/media/movies/youtube-dl/WILDFIRE.mp4 -c copy -metadata title=WILDFIRE -metadata date=20150709 -metadata 'description=Court-mtrage d'"'"'animation de fin d'"'"'tudes (promotion 2015)
Synopsis :
Ena, femme pompire passionne, est trs investie dans son mtier. Sa fascination pour le feu l'"'"'panouie autant qu'"'"'elle impacte sa vie familiale.
Ena, a passionate firefighter and wife, is very involved in her profession. Her fascination with fire reveals itself as it impacts her family life.
Ralisateurs/Directors :
Hugues OPTER : huguesopter.tumblr.com
Pierre PINON : arkenn.blogspot.fr
Nicole STAFFORD : nicole-stafford.tumblr.com/
Valentin STOLL : valentinstoll.tumblr.com/
Arnaud TRIBOUT :  triboutarn.tumblr.com/
Shang ZHANG : justicerabbit.blogspot.fr/
Contact Production :
GOBELINS, l'"'"'cole de l'"'"'image : Mora Marguin, mmarguin@gobelins.fr. 
Contact Festival :
GOBELINS, l'"'"'cole de l'"'"'image : Luce Grosjean, film@gobelins.fr. 
Distribution :
La distribution des films produits par GOBELINS, l'"'"'cole de l'"'"'image est assure par L'"'"'Agence du court mtrage.
Contact : f.keller@agencecm.com.
Retrouvez GOBELINS sur :
Site internet : gobelins.fr
Facebook : facebook.com/gobelins.ecole
Twitter : twitter.com/gobelins_paris' -metadata 'comment=Court-mtrage d'"'"'animation de fin d'"'"'tudes (promotion 2015)
Synopsis :
Ena, femme pompire passionne, est trs investie dans son mtier. Sa fascination pour le feu l'"'"'panouie autant qu'"'"'elle impacte sa vie familiale.
Ena, a passionate firefighter and wife, is very involved in her profession. Her fascination with fire reveals itself as it impacts her family life.
Ralisateurs/Directors :
Hugues OPTER : huguesopter.tumblr.com
Pierre PINON : arkenn.blogspot.fr
Nicole STAFFORD : nicole-stafford.tumblr.com/
Valentin STOLL : valentinstoll.tumblr.com/
Arnaud TRIBOUT :  triboutarn.tumblr.com/
Shang ZHANG : justicerabbit.blogspot.fr/
Contact Production :
GOBELINS, l'"'"'cole de l'"'"'image : Mora Marguin, mmarguin@gobelins.fr. 
Contact Festival :
GOBELINS, l'"'"'cole de l'"'"'image : Luce Grosjean, film@gobelins.fr. 
Distribution :
La distribution des films produits par GOBELINS, l'"'"'cole de l'"'"'image est assure par L'"'"'Agence du court mtrage.
Contact : f.keller@agencecm.com.
Retrouvez GOBELINS sur :
Site internet : gobelins.fr
Facebook : facebook.com/gobelins.ecole
Twitter : twitter.com/gobelins_paris' -metadata purl=https://vimeo.com/133021237 -metadata 'artist=GOBELINS pro' file:/media/movies/youtube-dl/WILDFIRE.temp.mp4
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 474, in main
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 464, in _real_main
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2008, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 807, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 861, in process_ie_result
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1642, in process_video_result
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1989, in process_info
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2054, in post_process
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 498, in run
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 230, in run_ffmpeg_multiple_files
  File "/usr/local/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/local/lib/python3.6/subprocess.py", line 1295, in _execute_child
    restore_signals, start_new_session, preexec_fn)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 19: ordinal not in range(128)

Description

The warning:

WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.

appears, even when no special characters should be involved, such as with the youtube-dl update listed above.

In cases with an actual download, even if --restrict-filenames is directly applied to the command, the following error occurs each time:

UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 19: ordinal not in range(128)
@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 11, 2019

Setup proper UTF-8 locale.

@dstftw dstftw closed this May 11, 2019
@itskando
Copy link
Author

@itskando itskando commented May 11, 2019

Setup proper UTF-8 locale.

This fixed it.
How-to found here.

@Achilles718611
Copy link

@Achilles718611 Achilles718611 commented May 30, 2020

I got the same error.
I change the default local to en_US.UTF-8, but it still doesn't work.

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Please help me.

@Achilles718611
Copy link

@Achilles718611 Achilles718611 commented May 30, 2020

It's appeared videos which has spanish title.
This is the video which I tried to download.
https://www.youtube.com/watch?v=XlFOpw8tG7Y

UnicodeEncodeError: 'ascii' codec can't encode character '\xfa' in position 10: ordinal not in range(128)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.