Pythhon SDK Indexer; Cannot work with AlgoExplorer

Long story short, the only way I’ve been able to get indexer from algosdk.v2client in the python SDK to work is with PureStake. I can’t get it to work with AlgoExplorer, or with AlgoNode. I get a nice variety of errors.

Here’s some code example of it not working:

from algosdk.v2client import indexer
indexer_server = ""
indexer_client = indexer.IndexerClient("", indexer_server, {"User-Agent":"DoYouLoveMe?"})

I tried changing User-Agent after reading a similar error with AlgodClient on here, but didn’t get anywhere with it. I’d appreciate any help.

What errors do you see?

You don’t need “/v2” at the end of the url here. It is appended under the hood in the algosdk. Try this:

indexer_server = ""

I agree that API update announcement from algoexplorer is kinda misleading in that regard.

1 Like