smartcontractkit / full-blockchain-solidity-course-py

Ultimate Solidity, Blockchain, and Smart Contract - Beginner to Expert Full Course | Python Edition
MIT License
10.82k stars 2.91k forks source link

BROWNIE #1140

Open AlrohfAZ opened 2 years ago

AlrohfAZ commented 2 years ago

5:31:35 in the video, Typed the codes in exactly the same way and ran it but I keep getting this error TypeError: argument of type 'NoneType' is not iterable. This is the code; `from brownie import FundMe, MockV3Aggregator, network, config from scripts.helpful_scripts import get_account

def deploy_fund_me(): account = get_account()

pass the pricefeed address to our fund me contract

# if we are on a persistent address like rinkeby, use the associated address
# otherwise, deploy mocks
if network.show_active != "development":
    price_feed_address = config["networks"][network.show_active()][
        "eth_usd_price_feed"
    ]
else:
    print(f"The active network is{network.show_active()}")
    print("Deploying Mocks...")
    mock_aggregator = MockV3Aggregator.deploy(
        18, 200000000000000000000, {"from": account}
    )
    price_feed_address = mock_aggregator.address
    print("Mocks Deployed!")

fund_me = FundMe.deploy(price_feed_address, {"from": account}, publish_source=True)
print(f"Contract deployed to {fund_me.address}")

def main(): deploy_fund_me() `

leebut commented 2 years ago

Don't you need () after if network.show_active? Like this: if network.show_active() != "development":

AlrohfAZ commented 2 years ago

Don't you need () after if network.show_active? Like this: if network.show_active() != "development":

I just did that and it is still giving me the same error.