From 2e91158091a9deb506fc369d46ca7f34119371f2 Mon Sep 17 00:00:00 2001 From: Alex Nastetsky Date: Fri, 17 Apr 2015 16:30:46 -0400 Subject: [PATCH] Fixed UnicodeDecodeError --- thefuck/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thefuck/main.py b/thefuck/main.py index 6b378417..8ef92879 100644 --- a/thefuck/main.py +++ b/thefuck/main.py @@ -57,8 +57,8 @@ def get_command(args): """Creates command from `args` and executes it.""" script = ' '.join(args[1:]) result = Popen(script, shell=True, stdout=PIPE, stderr=PIPE) - return Command(script, result.stdout.read().decode(), - result.stderr.read().decode()) + return Command(script, result.stdout.read().decode('utf-8'), + result.stderr.read().decode('utf-8')) def get_matched_rule(command, rules, settings):