Closed AshrafAKRahman closed 2 years ago
Try source .env
in the terminal to load your .env
file
But running this it will expose all my private keys (api etc) so I am a little hesitant to run that on the terminal
This is a common error. Do either of these answer your question?
You have an issue with your .env
file and brownie-config.yaml
.
After setting up the environment and when I run the get WETH command: brownie run scripts/get_weth.py --network kovan i get the following error: INFO: Could not find files for the given pattern(s). Brownie v1.17.2 - Python development framework for Ethereum
File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie_cli__main__.py", line 64, in main importlib.import_module(f"brownie._cli.{cmd}").main() File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie_cli\run.py", line 44, in main network.connect(CONFIG.argv["network"]) File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\main.py", line 40, in connect web3.connect(host, active.get("timeout", 30)) File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 52, in connect uri = _expand_environment_vars(uri) File "..local\pipx\venvs\eth-brownie\lib\site-packages\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://kovan.infura.io/v3/$WEB3_INFURA_PROJECT_ID'
PS C:\Users\Ash> brownie run scripts/run_flash_loan_v2.py --network kovan INFO: Could not find files for the given pattern(s). Brownie v1.17.2 - Python development framework for Ethereum
File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie_cli__main.py", line 64, in main importlib.import_module(f"brownie._cli.{cmd}").main()
File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie_cli\run.py", line 44, in main network.connect(CONFIG.argv["network"]) File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\main.py", line 40, in connect web3.connect(host, active.get("timeout", 30)) File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 52, in connect uri = _expand_environment_vars(uri) File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 183, in _expand_environment_vars raise ValueError(f"Unable to expand environment variable in host setting: '{uri}'") rownie_cli\main__.py", line 64, in main importlib.import_module(f"brownie._cli.{cmd}").main() File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie_cli\run.py", line 44, in main network.connect(CONFIG.argv["network"]) File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\main.py", line 40, in connect web3.connect(host, active.get("timeout", 30)) File "..local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\web3.py", line 52, in connect uri = _expand_environment_vars(uri) File "..local\pipx\venvs\eth-brownie\lib\site-packages\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://kovan.infura.io/v3/$WEB3_INFURA_PROJECT_ID' PS C:\Users\Ash> brownie --version INFO: Could not find files for the given pattern(s). Brownie v1.17.2 - Python development framework for Ethereum