andelf / tronpy

TRON Python Client Library.
MIT License
204 stars 96 forks source link

TypeError: provider is not a HTTPProvider when using AsyncHTTPProvider #127

Closed Whatislove118 closed 6 months ago

Whatislove118 commented 6 months ago

version: 0.4.0 python: 3.11

Description:

When i try to use async provider for Tron

from tronpy.providers import HTTPProvider, AsyncHTTPProvider

like this: self.client = Tron(AsyncHTTPProvider(api_key=self.api_key))

I got error: TypeError: provider is not a HTTPProvider

MrNaif2018 commented 6 months ago

You need to use AsyncTron with AsyncHTTPProvider