l3uddz / cloudplow

Automatic rclone remote uploader, with support for multiple remote/folder pairings. UnionFS Cleaner functionality: Deletion of UnionFS whiteout files and their corresponding files on rclone remotes. Automatic remote syncer: Sync between different remotes via a Scaleway server instance, that is created and destroyed at every sync.
GNU General Public License v3.0
344 stars 46 forks source link

error parsing regexp: invalid escape sequence: `\ ` #81

Closed potpot59 closed 2 years ago

potpot59 commented 4 years ago

Describe the bug Error occur while trying to upload a file: 2020-02-06 11:40:43,240 - INFO - process - execute - 2020/02/06 11:40:43 Failed to load filters: bad glob pattern "\/movies\/Cars\ \(2006\)\/Plex\ Versions\/Optimized\ for\ Mobile\/\.inProgress\/Cars\\u00a0\ Quatre\ roues\ \(2006\)\.mp4\.33" (regexp "(^|/)\/movies\/Cars\ \(2006\)\/Plex\ Versions\/Optimized\ for\ Mobile\/\.inProgress\/Cars\\u00a0\ Quatre\ roues\ \(2006\)\.mp4\.33$"): error parsing regexp: invalid escape sequence:

To Reproduce Steps to reproduce the behavior:

  1. Have a filename containing \u00a0
  2. Try to upload it
  3. See error

Expected behavior No error and upload the file

Logs 2020-02-06 11:25:42,002 - INFO - cloudplow - do_upload - Starting upload 2020-02-06 11:25:42,011 - INFO - cloudplow - do_upload - There is XXX available service accounts 2020-02-06 11:25:42,012 - INFO - uploader - set_serviceaccount - Using service account: '/home/XXX/docker/sa/1.json' 2020-02-06 11:25:42,104 - INFO - uploader - upload - Uploading '/home/XXX/mnt/move' to remote: XXX 2020-02-06 11:25:42,134 - INFO - process - execute - 2020/02/06 11:25:42 Failed to load filters: bad glob pattern "\/movies\/Cars\ \(2006\)\/Plex\ Versions\/Optimized\ for\ Mobile\/\.inProgress\/Cars\\u00a0\ Quatre\ roues\ \(2006\)\.mp4\.33" (regexp "(^|/)\/movies\/Cars\ \(2006\)\/Plex\ Versions\/Optimized\ for\ Mobile\/\.inProgress\/Cars\\u00a0_\ Quatre\ roues\ \(2006\)\.mp4\.33$"): error parsing regexp: invalid escape sequence: 2020-02-06 11:25:42,135 - INFO - uploader - upload - Finished uploading to remote: XXX

System Information

potpot59 commented 4 years ago

Do not occur with the workaround https://github.com/l3uddz/cloudplow/issues/28#issuecomment-505731958 But it is not possible to fix it? I find that exclude_open_files is useful. Thanks

saltydk commented 2 years ago

Should be fixed in the develop branch.