From f95933c246690ac1762da9e12deb13977e73eda4 Mon Sep 17 00:00:00 2001 From: Lonami Date: Tue, 2 Apr 2019 14:33:41 +0200 Subject: [PATCH] Fix downloading contacts (#1147) --- telethon/client/downloads.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/client/downloads.py b/telethon/client/downloads.py index ec7e5628..871713c6 100644 --- a/telethon/client/downloads.py +++ b/telethon/client/downloads.py @@ -400,7 +400,7 @@ class DownloadMethods(UserMethods): file, 'contact', '.vcard', possible_names=[first_name, phone_number, last_name] ) - f = open(file, 'w', encoding='utf-8') + f = open(file, 'wb', encoding='utf-8') else: f = file