I was following the tutorial from this video and now I'm stuck during deploying a contract to rinkeby testnet.
If I run brownie run scripts/deploy.py --network rinkeby I get an error:
BrownieProject is an active project.
File "brownie/_cli/__main__.py", line 64, in main
importlib.import_module(f"brownie._cli.{cmd}").main()
File "brownie/_cli/run.py", line 44, in main
network.connect(CONFIG.argv["network"])
File "brownie/network/main.py", line 40, in connect
web3.connect(host, active.get("timeout", 30))
File "brownie/network/web3.py", line 52, in connect
uri = _expand_environment_vars(uri)
File "brownie/network/web3.py", line 183, in _expand_environment_vars
raise ValueError(f"Unable to expand environment variable in host setting: '{uri}'")
ValueError: Unable to expand environment variable in host setting: 'https://rinkeby.infura.io/v3/$WEB3_INFURA_PROJECT_ID'
I checked the brownie-config.yaml file and .env for typing errors but haven't found anything.
brownie-config.yaml
dotenv: .env
wallets:
from_key: ${PRIVATE_KEY}
I already created an infura api and add it in the .env file as export WEB3_INFURA_PROJECT_ID=abc12345656789.
If I run the command brownie run scripts/deploy.py everything works fine so I can exclude any typo. Does someone have an idea what's the problem?
I use Brownie v1.17.2