From 7cb7e981290ac3851503569814758332e8bee8b4 Mon Sep 17 00:00:00 2001 From: Niels Grieger Date: Wed, 27 Feb 2019 09:51:16 +0100 Subject: [PATCH] fix: fix type error during get_holdings request --- fints/client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fints/client.py b/fints/client.py index 55cb3ab..c5a7d72 100644 --- a/fints/client.py +++ b/fints/client.py @@ -605,7 +605,12 @@ class FinTS3Client: holdings = [] for resp in responses: - mt535_lines = str.splitlines(resp.holdings) + if type(resp.holdings) == bytes: + holding_str = resp.holdings.decode() + else: + holding_str = resp.holdings + + mt535_lines = str.splitlines(holding_str) # The first line is empty - drop it. del mt535_lines[0] mt535 = MT535_Miniparser() -- 2.39.5