diff --git a/atreal_openads/utils.py b/atreal_openads/utils.py index f8c3059..ccd6828 100644 --- a/atreal_openads/utils.py +++ b/atreal_openads/utils.py @@ -94,7 +94,7 @@ def normalize(value): def get_file_data(path, b64=True): """Return the content of a file as a string, in base64 if specified.""" - with open(path, 'r') as file_pt: + with open(path, 'rb') as file_pt: if b64: return base64.b64encode(file_pt.read()) return file_pt.read()