From 5ce4b167bf847e44c509ff7e57f525a39399e92b Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 7 Oct 2024 16:38:05 -0500 Subject: [PATCH 1/2] fixed crashing on account balance greater than 1k --- wellsfargoAPI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wellsfargoAPI.py b/wellsfargoAPI.py index 7d6c779f..65fcf968 100644 --- a/wellsfargoAPI.py +++ b/wellsfargoAPI.py @@ -132,7 +132,7 @@ def wellsfargo_init(botObj, WELLSFARGO_EXTERNAL=None, DOCKER=False, loop=None): balance_element = account_block.find_element( By.CSS_SELECTOR, '[data-testid$="-balance"]' ) - balance = float(balance_element.text.replace("$", "")) + balance = float(balance_element.text.replace("$", "").replace(",", "")) WELLSFARGO_obj.set_account_totals(name, masked_number_text, balance) except Exception as e: wellsfargo_error(driver, e) From 5d8f4513f04246c779adf21f6f08574168190a1d Mon Sep 17 00:00:00 2001 From: Nelson Dane <47427072+NelsonDane@users.noreply.github.com> Date: Mon, 7 Oct 2024 18:53:10 -0400 Subject: [PATCH 2/2] fix fidelity quant --- fidelityAPI.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fidelityAPI.py b/fidelityAPI.py index 0009de80..74d3956a 100755 --- a/fidelityAPI.py +++ b/fidelityAPI.py @@ -316,7 +316,7 @@ def getAccountInfo(self): # Get the last price last_price = str(row["Last Price"]).replace("$", "") # Get quantity - quantity = row["Quantity"] + quantity = str(row["Quantity"]).replace("-", "") # Get ticker ticker = str(row["Symbol"]) @@ -331,9 +331,9 @@ def getAccountInfo(self): # If the last price isn't available, just use the current value if len(last_price) == 0: last_price = val - # If the quantity is missing, just use 1 + # If the quantity is missing skip it if len(quantity) == 0: - quantity = 1 + continue # If the account number isn't populated yet, add it if row["Account Number"] not in self.account_dict: