From 7f536758ecdf87137586d28760dc2803fbc94feb Mon Sep 17 00:00:00 2001 From: Auridas F Date: Thu, 17 Dec 2020 15:04:53 +0200 Subject: [PATCH] Add encoding to bytes type cast --- prestapyt/prestapyt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prestapyt/prestapyt.py b/prestapyt/prestapyt.py index d688a34..5ab516e 100644 --- a/prestapyt/prestapyt.py +++ b/prestapyt/prestapyt.py @@ -547,7 +547,7 @@ def get_illegal_xml_chars(self): illegal_ranges = [fr'{chr(low)}-{chr(high)}' for (low, high) in illegal_unichrs] xml_illegal_character_regex = '[' + ''.join(illegal_ranges) + ']' - return re.compile(bytes(xml_illegal_character_regex)) + return re.compile(bytes(xml_illegal_character_regex), , encoding='utf-8') class PrestaShopWebServiceDict(PrestaShopWebService): """Interacts with the PrestaShop WebService API, use dict for messages."""