Net/url: invalid control character in URL

What is the problem you are having with rclone?

i try to use rclone copyurl from the list.txt i upload from pc to vps

Run the command 'rclone version' and share the full output of the command.

rclone-v1.56.0

Which cloud storage system are you using? (eg Google Drive)

Dropbox

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone cat list.txt | xargs -I item rclone copyurl "item" dropbox:test -a -P --dropbox-chunk-size 100M

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

2023-01-24 14:24:04 ERROR : Attempt 1/3 failed with 1 errors and: parse "https://th4ykc.debrid.it/dl/2mzudsdn07a61e/01-02-2020-139216167.mp4\r": net/url: invalid control character in URL
2023-01-24 14:24:04 ERROR : Attempt 2/3 failed with 1 errors and: parse "https://th4ykc.debrid.it/dl/2mzudsdn07a61e/01-02-2020-139216167.mp4\r": net/url: invalid control character in URL
2023-01-24 14:24:04 ERROR : Attempt 3/3 failed with 1 errors and: parse "https://th4ykc.debrid.it/dl/2mzun07a6ff1e/01-02-2020-139216167.mp4\r": net/url: invalid control character in URL
Transferred:              0 B / 0 B, -, 
Errors:                 1 (retrying may 
Elapsed time:         0.6s
2023/01/24 14:24:04 Failed to copyurl: parse "https://th4ykc.debrid.it/dl/2mzun07a61e/01-02-2020-139216167.mp4\r": net/url: invalid control character in URL
2023-01-24 14:24:04 ERROR : Attempt 1/3 failed with 1 errors and: parse "https://th4ykc.debrid.it/dl/2mzun0prrt9986/01-03-2020-165311413.mp4\r": net/url: invalid control character in URL
2023-01-24 14:24:04 ERROR : Attempt 2/3 failed with 1 errors and: parse "https://th4ykc.debrid.it/dl/2mzun0prrtp9986/01-03-2020-165311413.mp4\r": net/url: invalid control character in URL
2023-01-24 14:24:04 ERROR : Attempt 3/3 failed with 1 errors and: parse "https://th4ykc.debrid.it/dl/2mzun0prrtp9986/01-03-2020-165311413.mp4\r": net/url: invalid control character in URL
Transferred:              0 B / 0 B, -, 
Errors:                 1 (retrying may 
Elapsed time:         0.2s
2023/01/24 14:24:04 Failed to copyurl: parse "https://th4ykc.debrid.it/dl/2mzun0p9985656/01-03-2020-165311413.mp4\r": net/url: invalid control character in URL

it fine if i edit list txt using echo but i dont have any text editor. assume i cant install. so what choice do i have instead edit using echo 1 by 1

The problem here is the \r on the end.

I guess your file of URLs is a DOS text file. Run dos2unix on it (or similar) to remove the \r and it should work.

notepad++ can convert between dos and unix

1 Like