From 392f0070fb694c0bc4d3f4a767ebcd3d392d7f93 Mon Sep 17 00:00:00 2001 From: Konstantin Klimov Date: Tue, 4 Sep 2018 08:25:56 +0300 Subject: [PATCH] Fixed decode error in `api.core.primitives.string.py` --- pyrogram/api/core/primitives/string.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/api/core/primitives/string.py b/pyrogram/api/core/primitives/string.py index 5c05e5b0..7d26fb57 100644 --- a/pyrogram/api/core/primitives/string.py +++ b/pyrogram/api/core/primitives/string.py @@ -24,7 +24,7 @@ from . import Bytes class String(Bytes): @staticmethod def read(b: BytesIO, *args) -> str: - return super(String, String).read(b).decode() + return super(String, String).read(b).decode(errors='replace') def __new__(cls, value: str) -> bytes: return super().__new__(cls, value.encode())