Backup Error: TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Is anyone getting this error on Dropbox or Amazon S3?

Error message: Traceback (most recent call last): File “/home/ubuntu/frappe-bench/apps/frappe/frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py”, line 83, in take_backups_s3 validate_file_size() File “/home/ubuntu/frappe-bench/apps/frappe/frappe/integrations/offsite_backup_utils.py”, line 89, in validate_file_size file_size = get_file_size(latest_file, unit=“GB”) File “/home/ubuntu/frappe-bench/apps/frappe/frappe/integrations/offsite_backup_utils.py”, line 75, in get_file_size file_size = os.path.getsize(file_path) File “/home/ubuntu/frappe-bench/env/lib/python3.6/genericpath.py”, line 50, in getsize return os.stat(filename).st_size TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

This started two days ago and i can’t seem to understand the error.

Please see my comment here: https://github.com/frappe/erpnext/issues/24219#issuecomment-856896042