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 0xc3 in position 63: ordinal not in range(128) #93
Comments
I will try again when I get home as I am at work right now, but my first attempt to reproduce did not result in any errors:
|
I forgot to mention that downgrading to sshuttle 0.77.2 on my Archlinux client fixes the problem with this particular server (Debian 7.1, Python 2.7.3). I have other servers running Debian 8.4 with Python 2.7.9 and that work with both sshuttle 0.77.2 and 0.78.0. |
Oops, I mixed the versions. I was testing 2.7 on the client and 3.5 on the server when you are reporting the reverse. Unfortunately I don't have a machine with 3.5 and iptables at hand. When I get home I will try to reproduce. Weird that a minor difference in Python (2.7.3 to 2.7.9) makes the problem go away 😲 |
There is a report on the mailing list that looks identical. https://groups.google.com/forum/#!topic/sshuttle/HNzO5iuYvzQ |
To me it looks that the output of So if you can reproduce the problem, please check the output of |
The working server (Debian 8.4 with Python 2.7.9) that works with both sshuttle 0.77.2 and 0.78.0 has its locale set to English:
And the non working one (only with shuttle 0.78 though) running Debian 7.1, Python 2.7.3 has its locale set to French. Could the weird accent found on the word "Fenêtre" be a problem?
|
Oh, of course, locale dependant. I never even considered this as a possibility. Seems so obvious now... Guessing we should set LC_ALL to C (as LC_ALL overrides all other environment variables including LANG) when running this external command (and possibly other external commands too). |
Hi folks! In my remote system i got this output: [suporte@mylocation ~]$ netstat -rn The affirmation of alphazo makes a sense. The problem are in accent character in "netstat" output. |
Guys, I edited server.py file in my system. Original: 69 cols = re.split(r'\s+', line.decode("ascii")) Edited: 69 cols = re.split(r'\s+', line.decode("utf-8")) Apparently the problem was solved. |
@maronemoraes that is not a good solution because you are assuming utf-8. Not to mention there could be other changes due to locale. Far better to change the locale to C I think. About to commit a change to do this. |
Fixed in 8fad282. Would appreciate if somebody could test this. |
I confirm that it fixes the issue. I recompiled the latest git version 0.78.1.dev6<+ng1d64879 that includes your commit and I had no issue connecting to servers with non English locale. Thanks. |
Marking this as closed. Guess I need to do a new release soon. |
Hello, sshuttle 0.78.0 doesn't work with one of my Debian server since I have upgraded it. I have been using this setup for many years and it sudently broked.
I'm getting a UnicodeDecodeError similar to the one reported in issue #87 but with a different error message.
On the server side, I have a Debian Wheezy 7.1, openssh-server 6.6p1-4~bpo70+1 and Python 2.7.3-6+deb7u2.
On the client side, I'm running Archlinux with sshuttle 0.78.0, openssh 7.2p2-1, Python 3.5.1-2 (default python) but Python2 2.7.11-3 is also installed.
When launching sshuttle I'm getting:
Please note that when running the shuttle command a couple of times it ends up with a different message:
The text was updated successfully, but these errors were encountered: