-
|
Hello there I get a KeyError when trying to import the key from .env This is my code: from brownie import accounts, config def deploy_simple_storage():
# account = accounts[0]
# print(account)
# account = accounts.load("crome-account")
# print(account)
account = accounts.add(config["wallets"]["from_key"])
print(account)
def main():
deploy_simple_storage()brownie-config.yaml file: dotenv: .env
wallets:
from_key: ${PRIVATE_KEY}I have no idea why is not working, any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 21 replies
-
|
Aditionally I had been reading the documentation when I noticed something. According to documentation there is not a parameter called "wallets" on the brownie-config.yaml which makes all even more confusing. |
Beta Was this translation helpful? Give feedback.
-
|
I solved it by changing the folder structure. |
Beta Was this translation helpful? Give feedback.
-
|
I am having the same issue. I tried deleting the build folder. And yes the yaml file is in the brownie_simple_storage folder. Could you advice what the issue may be? the yaml code: the deploy code: |
Beta Was this translation helpful? Give feedback.
-
|
Thank you all, it’s been running well now!
…On Fri, Jan 28, 2022 at 2:13 AM Mattsll99 ***@***.***> wrote:
Hi @Daruma1800 <https://github.com/Daruma1800>! your .env and
brownie-config.yaml fils are in the test folder. Just move them to the root
folder.
—
Reply to this email directly, view it on GitHub
<#123 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWQ7ZR44LDXAQXUOWU7FEZLUYI6YXANCNFSM5FCLNSUA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
<smartcontractkit/full-blockchain-solidity-course-py/repo-discussions/123/comments/2064441
@github.com>
|
Beta Was this translation helpful? Give feedback.



I solved it by changing the folder structure.