s4cmd icon indicating copy to clipboard operation
s4cmd copied to clipboard

issues with '%' character in path

Open dlaflamme opened this issue 3 years ago • 0 comments

I am having issues when the source or target s3 path contains a '%' character. Specifically, the error I am seeing is:

"TypeError: not enough arguments for format string"

I no longer have the full stack trace, but this is happening when message() is called with a single string argument that contains '%' (that are legitimately part of the source or target file path) and with no additional arguments.

This issue was mentioned in issue #33 from 2016. The comment before that issue was closed correctly indicated that the problem was the use of call sites that "call message(str) instead of message('%s', str)" However there appears to still be calls to message(str) in the latest code. One example is: https://github.com/bloomreach/s4cmd/blob/7191685030a46112a0df62fff7f27970c291fab1/s4cmd.py#L1463

Would you prefer to confirm and fix this throughout the codebase or should I open a PR?

dlaflamme avatar Mar 07 '22 17:03 dlaflamme