twitter-export-image-fill icon indicating copy to clipboard operation
twitter-export-image-fill copied to clipboard

"The syntax of the command is incorrect" appears 3 times after each video attempt

Open trwnh opened this issue 6 years ago • 3 comments

Windows 10, running the following command after renaming the script to media.py for brevity and putting youtube-dl.exe in the same directory:

media.py --include-video youtube-dl.exe --continue-after-failure

It doesn't look like a problem with finding youtube-dl, but every single video seems to be generating this error message 3 times in a row. For example:

[2.8%] 2017/08: Downloading video 1...The syntax of the command is incorrect.
.The syntax of the command is incorrect.
.The syntax of the command is incorrect.
[2.9%] 2017/08: Downloading video 1...The syntax of the command is incorrect.
.The syntax of the command is incorrect.
.The syntax of the command is incorrect.

trwnh avatar Aug 18 '18 17:08 trwnh

Ah, yeah, the syntax of that line is highly Linux/Unix-specific. It goes something like this:

$YOUTUBEDL.EXE -q --no-warnings $URL --exec 'mv {} $DESTINATION' &>/dev/null

It 1) downloads the file, then upon executing 2) moves it to where it needs to be, and all the while 3) asks the output to be really quiet. I bet 2) and 3) break on Windows (no mv or /dev/null there) – but I am not sure how to fix it. Would you?

It’s the line 157 in code.

(Three times is just because every download is tried thrice.)

mwichary avatar Aug 18 '18 17:08 mwichary

mv on windows is called move, why do you need dev null?

Inversil avatar Apr 22 '19 21:04 Inversil

/dev/null is there, as far as I remember, to prevent the output from being incredibly verbose, which it normally is.

mwichary avatar Apr 23 '19 03:04 mwichary