Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

account not accessible through brownie accounts while using --network ganache-local #35

Closed
babe8901 opened this issue Feb 28, 2022 · 2 comments

Comments

@babe8901
Copy link

(eth-brownie) PS C:\Users\lucky\Desktop\Investing\Courses\Solidity\demos\brownie_fund_me> brownie run scripts/deploy.py --network ganache-local
INFO: Could not find files for the given pattern(s).
Brownie v1.18.1 - Python development framework for Ethereum

BrownieFundMeProject is the active project.

Running '\Users\lucky\Desktop\Investing\Courses\Solidity\demos\brownie_fund_me\scripts\deploy.py::main'...
File "C:\Users\lucky.local\pipx\venvs\eth-brownie\lib\site-packages\brownie_cli\run.py", line 51, in main
return_value, frame = run(
File "C:\Users\lucky.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\scripts.py", line 103, in run
return_value = f_locals[method_name](*args, **kwargs)
File "\Users\lucky\Desktop\Investing\Courses\Solidity\demos\brownie_fund_me\scripts\deploy.py", line 31, in main
deploy_fund_me()
File "\Users\lucky\Desktop\Investing\Courses\Solidity\demos\brownie_fund_me\scripts\deploy.py", line 10, in deploy_fund_me
account = get_account()
File ".\scripts\helpful_scripts.py", line 12, in get_account
return accounts[0]
File "C:\Users\lucky.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\account.py", line 115, in getitem
return self._accounts[key]
IndexError: list index out of range

I can run the chain locally and on the rinkeby testnet, but when I run it using --network ganache-local, it is throwing this error. I think it is not able to get the account address.

@PatrickAlphaC
Copy link
Owner

Can you ask this on the main repo? Thanks!

https://github.com/smartcontractkit/full-blockchain-solidity-course-py

@babe8901
Copy link
Author

babe8901 commented Mar 7, 2022

I got this figured out. Looks like it did not work because I set the host to http://0.0.0.0:8545 instead of http://127.0.0.1:8545. I saw the instructor use the former one and it worked, but not for me. Must be something with ganache, I guess.

@babe8901 babe8901 closed this as completed Mar 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants