Jan-07-2021, 07:02 PM
Using Python 3 and the in3 imported package, how do I get the in3.Client() to create a variable with attributes .account and .contract? I am using Python 3. The last two lines of this code (taken from https://pypi.org/project/in3/) fail:
I tried to find out what member objects the in3_client instance/object has. I ran this:
import in3 in3_client = in3.Client() block_number = in3_client.eth.block_number() print(block_number) in3_client # incubed network api in3_client.eth # ethereum api in3_client.account # ethereum account api in3_client.contract # ethereum smart-contract apiI expect in3_client.account and in3_client.contract to work (or have a value). I get an error like this:
Quote: AttributeError: module 'in3_client' has no attribute 'account'
I tried to find out what member objects the in3_client instance/object has. I ran this:
>>> in3_client = in3.Client() >>> print(in3_client.__dict__.keys()) dict_keys(['_runtime', 'eth', '_factory'])Based on the above result, I see no "account" or "contract" (but I do see _runtime, eth, and _factory. How can .account and .contract be attributes of a variable created from in3.Client()? The documentation here indicates it should work.