-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 20: ordinal not in range(128) #1292
Comments
Could you add 2 debug lines in
and paste the output here? |
Gross. I'm guessing this is because Offhand I don't see a great way to handle this on our end besides possibly trying a more lenient, explicit encoding step before calling Alternately, we could trap this error in FTR, Google finds that this is a widespread problem with |
FYI: As of now, after some googling, I've applied a "workaround hack" as mentioned in http://stackoverflow.com/questions/2276200/changing-default-encoding-of-python (putting
|
From what I tested with
@akavel do you want to patch the file and retry? |
@bitprophet I believe the problem starts with Perhaps importing |
@georgepsarakis Yes, seemed to work for me ok with the patch! |
Thanks @akavel for testing! |
My understanding is that trying to use UTF-8 as a catchall will still cause issues elsewhere (e.g. folks using other encodings, such as UK Windows users) and possibly even for folks who wouldn't otherwise have encountered this. Also really not a fan of bare I think what would be ideal is to merge the two situations together: for f in files:
try:
n = posixpath.join(rcontext, f)
except UnicodeDecodeError:
n = posixpath.join(rcontext, f.decode('utf-8'))
# ... This way we ensure the If that change still works for @akavel and/or others, I'll go ahead and merge a copy of it. |
@bitprophet I agree on the bare Perhaps a more broad approach could be using getlocale to get the remote locale settings and use it instead of defaulting it to I still do not get entirely though the part that |
Hi, Same issue occurs simply when trying to run remote command, having output with some french characters:
As an example, we were trying to run testng (6.11) from ant, on a remote machine.
To reproduce, simply execute command on file with above content: Forgot to note version of fabrics: 0.9.3. Probably it's old. Thanks |
Is it possible that your terminal LANG or related vars are not UTF-8?
|
Hi, It's UTF-8. Thanks a lot! |
On Ubuntu, when trying to recursively
put()
a directory with a file which contains accented characters in the filename (specifically, the filename is:Fiat 500 - ciesz się małymi rzeczami!-720.mp4
), I got an exception like below when run with--show=debug
:Additional info:
The text was updated successfully, but these errors were encountered: