cjnaz / rclonesync-V2

A Bidirectional Cloud Sync Utility using rclone
MIT License
355 stars 39 forks source link

error on path with caracter encoding #16

Closed woulf closed 5 years ago

woulf commented 5 years ago

When i try to sync my sharepoint/onedrive pro with a local folder i always end with errors

2018/11/23 09:13:39 ERROR : Attempt 3/3 failed with 1 errors
2018-11-23 09:13:39,340:    WARNING  rclone copyto try 3 failed.         - xxxx-xxxx:Dossiers Techniques/Datacenter xxxx/palo alto decryption case/20171116%2Fxxxxxx.pcap
2018-11-23 09:13:39,341:    ERROR    rclone copyto failed.  (Line 170)   - xxxx-xxxx:Dossiers Techniques/Datacenter xxxxx/palo alto decryption case/20171116%2Fxxxx.pcap
2018-11-23 09:13:39,342:  ***** Critical Error Abort - Must run --first-sync to recover.  See README.md *****

rclone sync works for the same directory. It always seems to happens when there is an encoded caracter in the path (% something, %2F here)

cjnaz commented 5 years ago

Hi, Sorry for the delay. I'll do some testing to see if I can find a test case. Will a '%' in the filename demonstrate the failure?

elifio commented 5 years ago

Exception in load_list loading ....[...]

ERROR Failed loading current Path1 list file

with files 'á é í ó ú' in his name

I'm using windows local files with a sync remote-> pcloud The first time y sync (-1 flag) and int the name of dir/file contains 'á é í ó ú ñ' get the error.

cjnaz commented 5 years ago

Hi. I need a test case. Please reply with an encoded text string and I'll try to rename a file on my end to match.

elifio commented 5 years ago

Try to name a file

file_enconde_mañana_funcionará.txt

I trying to update my local repository. After the first sync, it do ok.

I think after the first update, it does it well

I have... path1(local directory) path2(remote) ;)

elifio commented 5 years ago

Confirmed (pcloud)

This error appears when the remote file is new and you try to download to the local.

No only the first time... The file include a Ñ

"error reading source directory: directory not found" <(<class 'UnicodeDecodeError'>, UnicodeDecodeError('charmap'

I suppose is the encode

cjnaz commented 5 years ago

This bug only showed up on Windows and when running with Python 2.7. Now fixed in rclonesync.py V2.5. The root issue is that the Windows Python 2.7 subprocess.py module does not support extended characters (non-ASCII, UTF-8) in the issued command. The Windows Python 3.x subprocess.py module does support extended characters. To fix this for Windows Python 2.7 I added the win_subprocess.py module from Valentin Lab (https://gist.github.com/vaab/2ad7051fc193167f15f85ef573e54eb9). I also added an extensive extended characters test case with 2, 3, and 4 byte UTF-8 charaters.
Please let me know if this solves your problems and if you find additional problems. I'll preemptively close this issue.

elifio commented 5 years ago

it's works. great...

Good Job