Avoiding write protection when importing XLSX files to Google Drive

What is the problem you are having with rclone?

I'm not sure if this is an rclone problem or a Google Drive problem but I wonder if there is a better workaround on the rclone side.

XLSX files importes to Google Drive sometimes become write protected in Google Sheets, which is a problem since there is no way to unlock them in the Android version of GSheets. The only workaround I've found so far is to first delete the file in the GDrive app, which is less than ideal. It would seem like the imported file gets write protected if there already was a file of the same name on Drive.

What is your rclone version (output from rclone version)

rclone v1.56.0-beta.5513.c0cda087a
- os/version: unknown
- os/kernel: 4.9.118-21637096 (aarch64)
- os/type: android
- os/arch: arm64
- go/version: go1.14.15
- go/linking: dynamic
- go/tags: none

I'm using this version because of another problem and because the version in the Termux repo is too old.

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Termux on Android

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

Google Drive

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

rclone --verbose sync --drive-import-formats xlsx . gd:some-dir

The rclone config contents with secrets removed.

Paste config here

The only potentially interesting and potentially non-secret info is the root_folder_id. I'm not sure if it is safe to share.

A log from the command with the -vv flag

This is a log from syncing to a new directory as I'm wary of botching things more than I already have.

2021/06/20 08:51:24 DEBUG : rclone: Version "v1.56.0-beta.5513.c0cda087a" starting with parameters ["rclone-beta" "-vv" "sync" "--drive-import-formats" "xlsx" "." "gdm:ewd2"]
2021/06/20 08:51:24 DEBUG : Creating backend with remote "."
2021/06/20 08:51:24 DEBUG : Using config file from "/data/data/com.termux/files/home/.config/rclone/rclone.conf"
2021/06/20 08:51:24 DEBUG : fs cache: renaming cache item "." to be canonical "/data/data/com.termux/files/home/doc/en-w-diac/gdm"
2021/06/20 08:51:24 DEBUG : Creating backend with remote "gdm:ewd2"
2021/06/20 08:51:24 DEBUG : gdm: detected overridden config - adding "{...}" suffix to name
2021/06/20 08:51:25 DEBUG : fs cache: renaming cache item "gdm:ewd2" to be canonical "gdm{...}:ewd2"
2021/06/20 08:51:25 DEBUG : Google drive root 'ewd2': Waiting for checks to finish
2021/06/20 08:51:25 DEBUG : Google drive root 'ewd2': Waiting for transfers to finish
2021/06/20 08:51:28 DEBUG : en-w-diac-consonants.tsv: MD5 = 9d3f1e25f9b35a951641916039cdf578 OK
2021/06/20 08:51:28 INFO  : en-w-diac-consonants.tsv: Copied (new)
2021/06/20 08:51:29 DEBUG : en-w-diac-vowels.tsv: MD5 = 0a1c7b9a170c858a7c4c22f22dd865e8 OK
2021/06/20 08:51:29 INFO  : en-w-diac-vowels.tsv: Copied (new)
2021/06/20 08:51:29 DEBUG : pacer: low level retry 1/1 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2021/06/20 08:51:29 DEBUG : pacer: Rate limited, increasing sleep to 1.742509879s
2021/06/20 08:51:29 DEBUG : en-w-diac.txt: Received error: googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded - low level retry 1/10
2021/06/20 08:51:29 DEBUG : pacer: low level retry 1/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2021/06/20 08:51:29 DEBUG : pacer: Rate limited, increasing sleep to 2.347715693s
2021/06/20 08:51:29 DEBUG : pacer: low level retry 1/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2021/06/20 08:51:29 DEBUG : pacer: Rate limited, increasing sleep to 4.988139347s
2021/06/20 08:51:30 DEBUG : pacer: Reducing sleep to 0s
2021/06/20 08:51:30 INFO  : en-w-diac-vowels.xlsx: Copied (new)
2021/06/20 08:51:30 INFO  : en-w-diac-consonants.xlsx: Copied (new)
2021/06/20 08:51:31 DEBUG : pacer: low level retry 1/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2021/06/20 08:51:31 DEBUG : pacer: Rate limited, increasing sleep to 1.173006406s
2021/06/20 08:51:31 DEBUG : pacer: low level retry 2/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2021/06/20 08:51:31 DEBUG : pacer: Rate limited, increasing sleep to 2.345004566s
2021/06/20 08:51:31 DEBUG : pacer: low level retry 2/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2021/06/20 08:51:31 DEBUG : pacer: Rate limited, increasing sleep to 4.7568908s
2021/06/20 08:51:31 DEBUG : pacer: low level retry 2/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2021/06/20 08:51:31 DEBUG : pacer: Rate limited, increasing sleep to 8.292676758s
2021/06/20 08:51:32 DEBUG : pacer: low level retry 3/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2021/06/20 08:51:32 DEBUG : pacer: Rate limited, increasing sleep to 16.782706157s
2021/06/20 08:51:40 DEBUG : pacer: Reducing sleep to 0s
2021/06/20 08:51:58 ERROR : log1.txt: Failed to copy: can't copy - source file is being updated (size changed from 745 to 3273)
2021/06/20 08:51:58 DEBUG : en-w-diac.txt: MD5 = d51327de0ef3bd87eaa420cb7f39491c OK
2021/06/20 08:51:58 INFO  : en-w-diac.txt: Copied (new)
2021/06/20 08:51:58 DEBUG : north-wind.txt: MD5 = 7d3a097cd3e805fbfc1324b10f33dbd4 OK
2021/06/20 08:51:58 INFO  : north-wind.txt: Copied (new)
2021/06/20 08:51:58 ERROR : Google drive root 'ewd2': not deleting files as there were IO errors
2021/06/20 08:51:58 ERROR : Google drive root 'ewd2': not deleting directories as there were IO errors
2021/06/20 08:51:58 ERROR : Attempt 1/3 failed with 1 errors and: can't copy - source file is being updated (size changed from 745 to 3273)
2021/06/20 08:51:59 DEBUG : Google drive root 'ewd2': Waiting for checks to finish
2021/06/20 08:51:59 DEBUG : en-w-diac-consonants.tsv: Size and modification time the same (differ by -311.363µs, within tolerance 1ms)
2021/06/20 08:51:59 DEBUG : en-w-diac-consonants.tsv: Unchanged skipping
2021/06/20 08:51:59 DEBUG : en-w-diac-consonants.xlsx: Modification times differ by 1h55m33.666s: 2021-06-20 06:55:53.385 +0000 UTC, 2021-06-20 08:51:27.051 +0000 UTC
2021/06/20 08:51:59 DEBUG : en-w-diac-vowels.tsv: Size and modification time the same (differ by -229.054µs, within tolerance 1ms)
2021/06/20 08:51:59 DEBUG : en-w-diac-vowels.tsv: Unchanged skipping
2021/06/20 08:51:59 DEBUG : en-w-diac-vowels.xlsx: Modification times differ by 1h36m18.581s: 2021-06-20 07:15:08.103 +0000 UTC, 2021-06-20 08:51:26.684 +0000 UTC
2021/06/20 08:51:59 DEBUG : en-w-diac.txt: Size and modification time the same (differ by -308.427µs, within tolerance 1ms)
2021/06/20 08:51:59 DEBUG : en-w-diac.txt: Unchanged skipping
2021/06/20 08:51:59 DEBUG : north-wind.txt: Size and modification time the same (differ by -331.443µs, within tolerance 1ms)
2021/06/20 08:51:59 DEBUG : north-wind.txt: Unchanged skipping
2021/06/20 08:51:59 DEBUG : Google drive root 'ewd2': Waiting for transfers to finish
2021/06/20 08:52:00 ERROR : log1.txt: Failed to copy: can't copy - source file is being updated (size changed from 4025 to 5310)
2021/06/20 08:52:00 INFO  : en-w-diac-consonants.xlsx: Copied (replaced existing)
2021/06/20 08:52:01 INFO  : en-w-diac-vowels.xlsx: Copied (replaced existing)
2021/06/20 08:52:01 ERROR : Google drive root 'ewd2': not deleting files as there were IO errors
2021/06/20 08:52:01 ERROR : Google drive root 'ewd2': not deleting directories as there were IO errors
2021/06/20 08:52:01 ERROR : Attempt 2/3 failed with 1 errors and: can't copy - source file is being updated (size changed from 4025 to 5310)
2021/06/20 08:52:01 DEBUG : Google drive root 'ewd2': Waiting for checks to finish
2021/06/20 08:52:01 DEBUG : en-w-diac-consonants.tsv: Size and modification time the same (differ by -311.363µs, within tolerance 1ms)
2021/06/20 08:52:01 DEBUG : en-w-diac-consonants.tsv: Unchanged skipping
2021/06/20 08:52:01 DEBUG : en-w-diac-consonants.xlsx: Size and modification time the same (differ by 0s, within tolerance 1ms)
2021/06/20 08:52:01 DEBUG : en-w-diac-consonants.xlsx: Unchanged skipping
2021/06/20 08:52:01 DEBUG : en-w-diac-vowels.tsv: Size and modification time the same (differ by -229.054µs, within tolerance 1ms)
2021/06/20 08:52:01 DEBUG : en-w-diac-vowels.tsv: Unchanged skipping
2021/06/20 08:52:01 DEBUG : en-w-diac.txt: Size and modification time the same (differ by -308.427µs, within tolerance 1ms)
2021/06/20 08:52:01 DEBUG : en-w-diac.txt: Unchanged skipping
2021/06/20 08:52:01 DEBUG : en-w-diac-vowels.xlsx: Size and modification time the same (differ by 0s, within tolerance 1ms)
2021/06/20 08:52:01 DEBUG : en-w-diac-vowels.xlsx: Unchanged skipping
2021/06/20 08:52:01 DEBUG : north-wind.txt: Size and modification time the same (differ by -331.443µs, within tolerance 1ms)
2021/06/20 08:52:01 DEBUG : north-wind.txt: Unchanged skipping
2021/06/20 08:52:01 DEBUG : Google drive root 'ewd2': Waiting for transfers to finish
2021/06/20 08:52:02 ERROR : log1.txt: Failed to copy: can't copy - source file is being updated (size changed from 5940 to 7291)
2021/06/20 08:52:02 ERROR : Google drive root 'ewd2': not deleting files as there were IO errors
2021/06/20 08:52:02 ERROR : Google drive root 'ewd2': not deleting directories as there were IO errors
2021/06/20 08:52:02 ERROR : Attempt 3/3 failed with 1 errors and: can't copy - source file is being updated (size changed from 5940 to 7291)
2021/06/20 08:52:02 INFO  : 
Transferred:   	   49.326Ki / 49.326 KiByte, 100%, 1.361 KiByte/s, ETA 0s
Errors:                 1 (retrying may help)
Checks:                12 / 12, 100%
Transferred:            8 / 8, 100%
Elapsed time:        37.9s

2021/06/20 08:52:02 DEBUG : 11 go routines active
2021/06/20 08:52:02 Failed to sync: can't copy - source file is being updated (size changed from 5940 to 7291)

hi,

not sure if it matters, but perhaps test using a stable version, not a beta

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.