Hello,
I am having trouble connecting to Infura API with Brownie. I’m new to coding.
I’m on Windows and I ran on PowerShell with .env activated:
set WEB3_INFURA_PROJECT_ID=[my project ID]
brownie console --network mainnet
I then get a series of error lines ending with:
raise ValueError(f"Unable to expand environment variable in host setting: ‘{uri}’")
ValueError: Unable to expand environment variable in host setting: ‘https://mainnet.infura.io/v3/$WEB3_INFURA_PROJECT_ID’
I have tried creating a brownie-config.yalm file and adding dotenv: .env
, but it did not change anything.
Does someone know what the problem might be? Thanks.