Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

round_num and block no longer allowed when querying balances #471

Open
BunsanMuchi opened this issue Apr 29, 2023 · 4 comments
Open

round_num and block no longer allowed when querying balances #471

BunsanMuchi opened this issue Apr 29, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@BunsanMuchi
Copy link

Subject of the issue

Your environment

py-algorand-sdk 2.0.0

Steps to reproduce

  1. Call the method asset_balances(asset_id, round_num=number) or asset_balances(asset_id, block=number)

Expected behaviour

A balance return at the given block/round number according to the docs: https://py-algorand-sdk.readthedocs.io/en/latest/algosdk/v2client/indexer.html

Actual behaviour

It seems like the method got changed, and doesn't allow for this parameter anymore, I believe it's a case of outdated docs or an undocumented change, since I get the following TypeErrors:

TypeError: IndexerClient.indexer_request() got an unexpected keyword argument 'round_num'
TypeError: IndexerClient.indexer_request() got an unexpected keyword argument 'block'

@BunsanMuchi BunsanMuchi added the new-bug Bug report that needs triage label Apr 29, 2023
@BunsanMuchi BunsanMuchi changed the title round_num and block no longer allowed when querying balances round_num and block no longer allowed when querying balances Apr 29, 2023
@tzaffi
Copy link
Contributor

tzaffi commented May 1, 2023

Thanks for identifying this issue. It appears that the docs getting generated are inaccurate and do not conform with the actual v2 API which does not accept block/round number.

This discrepancy ought to be fixed as soon as possible, even though it probably is a longstanding issue.

@BunsanMuchi
Copy link
Author

BunsanMuchi commented May 1, 2023

Yep, I've noticed it happens with a lot of places on both the SDK and the docs of the SDK. Plus the few methods that still support round_num or block end up with either rewind issues or just printing the current round, leading to confusing results. Thanks!

@tzaffi
Copy link
Contributor

tzaffi commented May 1, 2023

If you know off hand other instances, we welcome your feedback.

@algoanne algoanne added bug Something isn't working and removed new-bug Bug report that needs triage labels May 2, 2023
@tzaffi tzaffi self-assigned this May 2, 2023
@tzaffi
Copy link
Contributor

tzaffi commented May 8, 2023

The fix didn't make it into today's release, but will go in the next one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants