Skip to content

Lesson 10: 'Too many values to unpack (expected 5) #756

Answered by jacobbinnie
jacobbinnie asked this question in Q&A
Discussion options

You must be logged in to vote

Ah - I solved it! Turns out after reading through the official Aave LendingPool docs they've added an extra return value in their getUserAccountData() function. I simply had to add ltv as another parameter (not shown in the video tutorial) and everything worked perfectly.

def get_borrowable_data(lending_pool, account):
    (
        total_collateral_eth,
        total_debt_eth,
        available_borrow_eth,
        current_liquidation_threshold,
        ltv,
        health_factor,
    ) = lending_pool.getUserAccountData(account.address)
    available_borrow_eth = Web3.fromWei(available_borrow_eth, "ether")
    total_collateral_eth = Web3.fromWei(total_collateral_eth, "ether")
    total_de…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@cromewar
Comment options

@jacobbinnie
Comment options

Answer selected by jacobbinnie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants