PatrickAlphaC / brownie_fund_me

26 stars 64 forks source link

TypeError: argument of type 'NoneType' is not iterable #24

Closed SolemnDave closed 2 years ago

SolemnDave commented 2 years ago
Screen Shot 2022-01-25 at 1 36 09 PM

I ran brownie run scripts/deploy.py and received this error and I am unsure of what to do about it. Anyone have any suggestions ?

PatrickAlphaC commented 2 years ago

Can you show:

  1. Your brownie-config.yaml
  2. run brownie networks list true and show me the development network
  3. Your entire deploy.py file. Thanks
SolemnDave commented 2 years ago

Very well.

Here is my brownie-config.yaml:

Screen Shot 2022-01-27 at 10 31 29 AM

My brownie networks list true:

The following networks are declared:

Ethereum ├─Mainnet (Infura) │ ├─id: mainnet │ ├─chainid: 1 │ ├─explorer: https://api.etherscan.io/api │ ├─host: https://mainnet.infura.io/v3/$WEB3_INFURA_PROJECT_ID │ └─multicall2: 0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696 ├─Ropsten (Infura) │ ├─id: ropsten │ ├─chainid: 3 │ ├─explorer: https://api-ropsten.etherscan.io/api │ ├─host: https://ropsten.infura.io/v3/$WEB3_INFURA_PROJECT_ID │ └─multicall2: 0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696 ├─Rinkeby (Infura) │ ├─id: rinkeby │ ├─chainid: 4 │ ├─explorer: https://api-rinkeby.etherscan.io/api │ ├─host: https://rinkeby.infura.io/v3/$WEB3_INFURA_PROJECT_ID │ └─multicall2: 0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696 ├─Goerli (Infura) │ ├─id: goerli │ ├─chainid: 5 │ ├─explorer: https://api-goerli.etherscan.io/api │ ├─host: https://goerli.infura.io/v3/$WEB3_INFURA_PROJECT_ID │ └─multicall2: 0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696 ├─Kovan (Infura) │ ├─id: kovan │ ├─chainid: 42 │ ├─explorer: https://api-kovan.etherscan.io/api │ ├─host: https://kovan.infura.io/v3/$WEB3_INFURA_PROJECT_ID │ └─multicall2: 0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696 └─ganache-local ├─id: ganache-local ├─chainid: 1337 └─host: http://0.0.0.0:8545

Ethereum Classic ├─Mainnet │ ├─id: etc │ ├─chainid: 61 │ ├─explorer: https://blockscout.com/etc/mainnet/api │ └─host: https://www.ethercluster.com/etc └─Kotti ├─id: kotti ├─chainid: 6 ├─explorer: https://blockscout.com/etc/kotti/api └─host: https://www.ethercluster.com/kotti

Arbitrum └─Mainnet ├─id: arbitrum-main ├─chainid: 42161 ├─explorer: https://api.arbiscan.io/api ├─host: https://arb1.arbitrum.io/rpc └─multicall2: 0x5B5CFE992AdAC0C9D48E05854B2d91C73a003858

Avalanche ├─Mainnet │ ├─id: avax-main │ ├─chainid: 43114 │ ├─explorer: https://api.snowtrace.io/api │ └─host: https://api.avax.network/ext/bc/C/rpc └─Testnet ├─id: avax-test ├─chainid: 43113 └─host: https://api.avax-test.network/ext/bc/C/rpc

Binance Smart Chain ├─Testnet │ ├─id: bsc-test │ ├─chainid: 97 │ ├─explorer: https://api-testnet.bscscan.com/api │ └─host: https://data-seed-prebsc-1-s1.binance.org:8545 └─Mainnet ├─id: bsc-main ├─chainid: 56 ├─explorer: https://api.bscscan.com/api └─host: https://bsc-dataseed.binance.org

Fantom Opera ├─Testnet │ ├─id: ftm-test │ ├─chainid: 4002 │ ├─explorer: https://explorer.testnet.fantom.network │ └─host: https://rpc.testnet.fantom.network └─Mainnet ├─id: ftm-main ├─chainid: 250 ├─explorer: https://api.ftmscan.com/api └─host: https://rpcapi.fantom.network

Harmony └─Mainnet (Shard 0) ├─id: harmony-main ├─chainid: 1666600000 ├─host: https://api.harmony.one └─multicall2: 0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb

Polygon ├─Mainnet (Infura) │ ├─id: polygon-main │ ├─chainid: 137 │ ├─explorer: https://api.polygonscan.com/api │ ├─host: https://polygon-mainnet.infura.io/v3/$WEB3_INFURA_PROJECT_ID │ └─multicall2: 0xc8E51042792d7405184DfCa245F2d27B94D013b6 └─Mumbai Testnet (Infura) ├─id: polygon-test ├─chainid: 80001 ├─explorer: https://api-testnet.polygonscan.com/api ├─host: https://polygon-mumbai.infura.io/v3/$WEB3_INFURA_PROJECT_ID └─multicall2: 0x6842E0412AC1c00464dc48961330156a07268d14

XDai ├─Mainnet │ ├─id: xdai-main │ ├─chainid: 100 │ ├─explorer: https://blockscout.com/xdai/mainnet/api │ └─host: https://xdai.poanetwork.dev └─Testnet ├─id: xdai-test ├─chainid: 77 ├─explorer: https://blockscout.com/poa/sokol/api └─host: https://sokol.poa.network

Development ├─Ganache-CLI │ ├─id: development │ ├─cmd: ganache-cli │ └─host: http://127.0.0.1 │ ├─accounts: 10 │ ├─evm_version: istanbul │ ├─gas_limit: 12000000 │ ├─mnemonic: brownie │ └─port: 8545 ├─Geth Dev │ ├─id: geth-dev │ ├─cmd: ethnode │ └─host: http://127.0.0.1 │ └─port: 8545 ├─Hardhat │ ├─id: hardhat │ ├─cmd: npx hardhat node │ └─host: http://localhost │ └─port: 8545 ├─Hardhat (Mainnet Fork) │ ├─id: hardhat-fork │ ├─cmd: npx hardhat node │ ├─host: http://localhost │ └─timeout: 120 │ ├─fork: mainnet │ └─port: 8545 ├─Ganache-CLI (Mainnet Fork) │ ├─id: mainnet-fork │ ├─cmd: ganache-cli │ ├─host: http://127.0.0.1 │ └─timeout: 120 │ ├─accounts: 10 │ ├─evm_version: istanbul │ ├─fork: mainnet │ ├─gas_limit: 12000000 │ ├─mnemonic: brownie │ └─port: 8545 ├─Ganache-CLI (BSC-Mainnet Fork) │ ├─id: bsc-main-fork │ ├─cmd: ganache-cli │ ├─host: http://127.0.0.1 │ └─timeout: 120 │ ├─accounts: 10 │ ├─evm_version: istanbul │ ├─fork: bsc-main │ ├─gas_limit: 12000000 │ ├─mnemonic: brownie │ └─port: 8545 ├─Ganache-CLI (FTM-Mainnet Fork) │ ├─id: ftm-main-fork │ ├─cmd: ganache-cli │ ├─host: http://127.0.0.1 │ └─timeout: 120 │ ├─accounts: 10 │ ├─evm_version: istanbul │ ├─fork: ftm-main │ ├─gas_limit: 12000000 │ ├─mnemonic: brownie │ └─port: 8545 ├─Ganache-CLI (Polygon-Mainnet Fork) │ ├─id: polygon-main-fork │ ├─cmd: ganache-cli │ ├─host: http://127.0.0.1 │ └─timeout: 120 │ ├─accounts: 10 │ ├─evm_version: istanbul │ ├─fork: polygon-main │ ├─gas_limit: 20000000 │ ├─mnemonic: brownie │ └─port: 8545 ├─Ganache-CLI (XDai-Mainnet Fork) │ ├─id: xdai-main-fork │ ├─cmd: ganache-cli │ ├─host: http://127.0.0.1 │ └─timeout: 120 │ ├─accounts: 10 │ ├─evm_version: istanbul │ ├─fork: xdai-main │ ├─gas_limit: 20000000 │ ├─mnemonic: brownie │ └─port: 8545 └─Ganache-CLI (Avax-Mainnet Fork) ├─id: avax-main-fork ├─cmd: ganache-cli ├─host: http://127.0.0.1 └─timeout: 120 ├─accounts: 10 ├─evm_version: istanbul ├─fork: avax-main ├─gas_limit: 20000000 ├─mnemonic: brownie └─port: 8545

Lastly, my entire deploy.py file:

from brownie import FundMe, MockV3Aggregator, accounts, network, config from scripts.helpful_scripts import ( get_account, deploy_mocks, LOCAL_BLOCKCHAIN_ENVIRONMENTS, )

def deploy_fund_me(): account = get_account() if network.show_active() not in LOCAL_BLOCKCHAIN_ENVIRONMENTS: price_feed_address = config["networks"][network.show_active()][ "eth_usd_price_feed" ] else: deploy_mocks() price_feed_address = MockV3Aggregator[-1].address

fund_me = FundMe.deploy(
    price_feed_address,
    {"from": account},
    publish_source=config["networks"][network.show_active()].get("verify"),
)
print(f"Contract deployed to {fund_me.address}")
return fund_me

def main(): deploy_fund_me()

Note that although my deploy.py has changed since the time of the posting I still receive the same error. Thank you for your time.

PatrickAlphaC commented 2 years ago

What happens when you run:

node --version

and

ganache-cli --version

?

SolemnDave commented 2 years ago

When I run node --version I get:

v16.13.1

When I run ganache-cli --version

Ganache CLI v6.12.2 (ganache-core: 2.13.2)

Available Accounts

(0) 0xa2Fa8F406CA6bb467Cd8971e0C9d4A0f775B60dd (100 ETH) (1) 0xD1362b8D1bFccaE6b7F44d312B402057eCde39B6 (100 ETH) (2) 0x8536e31D5f529842002FA968907D59561c3DA105 (100 ETH) (3) 0x05ccf42C60098cff0326Db3FfB039049BdD9D957 (100 ETH) (4) 0x84331Fc82c67e43D46C3Ed9001CE2cF1A09c7b4B (100 ETH) (5) 0x83843221a6fE0Ad89393231769cD82119dd0595E (100 ETH) (6) 0xd7dD4C6ABDb8142386490bb52E9b8e3FAE66A509 (100 ETH) (7) 0x06a5E0847131ab479a05647E6Fee9e2A8E053FA9 (100 ETH) (8) 0x44921a58aC2d98Ba7C0d4be903f779778C9CE580 (100 ETH) (9) 0xf4840b983fc652E5546054DF8810C8228f8599d6 (100 ETH)

Private Keys

HD Wallet

Mnemonic: mix margin later venue fee truck ribbon flush scan claw quote refuse Base HD Path: m/44'/60'/0'/0/{account_index}

Gas Price

20000000000

Gas Limit

6721975

Call Gas Limit

9007199254740991

Listening on 127.0.0.1:8545

PatrickAlphaC commented 2 years ago

Oh, your config is messed up.

delete the kovan and mainnet line

SolemnDave commented 2 years ago

Oh wow ! Thank you so much.

I hard code everything as I watch the video so when you added the kovan and mainnet line in the video I never took it out. Thank you.

On Thu, Jan 27, 2022 at 2:29 PM Patrick Collins @.***> wrote:

Oh, your config is messed up.

delete the kovan and mainnet line

— Reply to this email directly, view it on GitHub https://github.com/PatrickAlphaC/brownie_fund_me/issues/24#issuecomment-1023567279, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWYSCWTSIO4TZWD2UF44NBDUYGMKJANCNFSM5MZBEOZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>