From 308adc4192863b423cb6c50a62359dd3fe2ec9f7 Mon Sep 17 00:00:00 2001 From: Lonami Date: Sun, 9 Oct 2016 13:47:38 +0200 Subject: [PATCH] Fixed invalid parameters when downloading documents --- telethon/telegram_client.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index bdd90a38..2e8daf81 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -474,7 +474,7 @@ class TelegramClient: self.download_file_loc(InputFileLocation(volume_id=largest_size.volume_id, local_id=largest_size.local_id, secret=largest_size.secret), - file_path, file_size, progress_callback) + file_path, file_size=file_size, progress_callback=progress_callback) return file_path def download_document(self, message_media_document, file_path=None, add_extension=True, @@ -507,8 +507,7 @@ class TelegramClient: self.download_file_loc(InputDocumentFileLocation(id=document.id, access_hash=document.access_hash, version=document.version), - file_path, file_size, progress_callback) - + file_path, file_size=file_size, progress_callback=progress_callback) return file_path @staticmethod