From c499283fa3c0eb6055b7f17ece5f2df16c67bb49 Mon Sep 17 00:00:00 2001 From: Martin Kristiansen Date: Tue, 11 Jun 2019 13:40:09 -0400 Subject: [PATCH] wget to write in binary mode This becomes crucial in python 3 since non-binary is UTF-8 --- opendr/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendr/utils.py b/opendr/utils.py index 843b470..a248056 100644 --- a/opendr/utils.py +++ b/opendr/utils.py @@ -34,4 +34,4 @@ def wget(url, dest_fname=None): contents = urlopen(url).read() except: raise Exception('Unable to get url: %s' % (url,)) - open(dest_fname, 'w').write(contents) + open(dest_fname, 'wb').write(contents)