From 4e3cae528250b9ce7ccbfd72f74a32135aca82f9 Mon Sep 17 00:00:00 2001 From: Alexander Kozlovsky Date: Fri, 9 Sep 2022 13:58:52 +0200 Subject: [PATCH] Fixes --- src/tribler/gui/tribler_window.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/tribler/gui/tribler_window.py b/src/tribler/gui/tribler_window.py index ab24cc5ebe7..80152df02b1 100644 --- a/src/tribler/gui/tribler_window.py +++ b/src/tribler/gui/tribler_window.py @@ -681,13 +681,7 @@ def on_add_button_pressed(channel_id): if scheme == FILE_SCHEME: file_path = url_to_path(uri) content = Path(file_path).read_bytes() - try: - post_data['torrent'] = b64encode(content).decode('utf8') - except UnicodeDecodeError as e: - self._logger.error(f'{e.__class__.__name__}: {e}') - error_message = f'Can not add the torrent to the personal channel: {e}' - ConfirmationDialog.show_message(self.window(), tr('Error'), tr(error_message), "OK") - + post_data['torrent'] = b64encode(content).decode('ascii') elif scheme == MAGNET_SCHEME: post_data['uri'] = uri