ValueError: Unable to expand environment variable in host setting
See original GitHub issueEnvironment information
- eth-brownie>=1.10.0,<2.0.0
ganache-cli
Version: 6.12.2solc
Version: 0.6.6- Python Version: 3.8.5
- OS: linux (ubuntu 20.04)
What was wrong?
Please include information like:
-
what command you ran
brownie run scripts/simple_collectible/deploy_simple.py --network rinkeby
-
the code that caused the failure (see this link for help with formatting code)
-
full output of the error you received
NftMixProject is the 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 43, 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 51, in connect
uri = _expand_environment_vars(uri)
File "brownie/network/web3.py", line 171, 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'
How can it be fixed?
Fill this in if you know how the bug could be fixed.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:53 (13 by maintainers)
Top Results From Across the Web
eth-brownie: Unable to expand environment variable in host ...
You can fix it by setting the variable in your .env file and adding dotenv: .env to your brownie-config.yaml . ... Remember to...
Read more >Brownie / Rinkeby: Unable to expand environment variable in ...
You can fix it by setting the variable in your .env file and adding dotenv: .env to your brownie-config.yaml . brownie-config.yaml :
Read more >Help With Brownie and Infura Environment Variables (Will ...
I think my problem is with the environment variables in brownie(I'm ... ValueError: Unable to expand environment variable in host setting: ...
Read more >eth-brownie/community - Gitter
You can specify the location of the build folder in the config file. ... Unable to expand environment variable in host setting: ...
Read more >Problems with Environment Variables
If the error message states that the environment variable is not set, IT MEANS PRECISELY THAT ! The most likely reason is that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So I ran into this issue while I was doing
test_lottery_unit.py
of @PatrickAlphaC 's tutorial.This might help you guys. Add this to the script
I also ran into this issue running
brownie test -k test_get_entrance_fee --network rinkeby
solved by adding
dotenv: .env
tobrownie-config.yaml