0

I want to connect Infura but im getting that error: `brownie run scripts/deploy.py --network goerli INFO: Could not find files for the given pattern(s). Brownie v1.16.4 - Python development framework for Ethereum

BrownieSimpleStorageMainProject is the active project.

Error:

Running 'scripts\deploy.py::main'...
File "C:\Users\tayyi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\brownie_cli\run.py", line 49, in main
return_value, frame = run(
File "C:\Users\tayyi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\brownie\project\scripts.py", line 103, in run
return_value = f_locals[method_name](*args, **kwargs)
File ".\scripts\deploy.py", line 23, in main
deploy_simple_storage()
File ".\scripts\deploy.py", line 5, in deploy_simple_storage
account = get_account()
File ".\scripts\deploy.py", line 19, in get_account
return accounts.add(config["wallets"]["from_key"])
File "C:\Users\tayyi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\brownie\network\account.py", line 140, in add
w3account = web3.eth.account.from_key(private_key)
File "C:\Users\tayyi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\eth_utils\decorators.py", line 18, in _wrapper
return self.method(obj, *args, **kwargs)
File "C:\Users\tayyi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\eth_account\account.py", line 250, in from_key
key = self._parsePrivateKey(private_key)
File "C:\Users\tayyi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\eth_utils\decorators.py", line 18, in _wrapper
return self.method(obj, *args, **kwargs)
File "C:\Users\tayyi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\eth_account\account.py", line 769, in _parsePrivateKey
return self._keys.PrivateKey(HexBytes(key))
File "C:\Users\tayyi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\hexbytes\main.py", line 23, in new
bytesval = to_bytes(val)
File "C:\Users\tayyi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\hexbytes_utils.py", line 17, in to_bytes
return hexstr_to_bytes(val)
File "C:\Users\tayyi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\hexbytes_utils.py", line 50, in hexstr_to_bytes
return binascii.unhexlify(ascii_hex)
Error: Non-hexadecimal digit found`

1 Answer 1

1

It seems to be an issue with your brownie configuration file or environment file.

!DON'T PASTE YOUR PRIVATE KEY!

If you are using the following configuration part in brownie-config.yaml

wallets:
  from_key: ${PRIVATE_KEY}

Please check that you are also using dotenv with an .env file:

dotenv: .env

And in .env file, you set the following variable with your private key value:

PRIVATE_KEY='0xdeadbeefdeadbeef...'
1
  • Yes it was about my private key. Thanks you so much :D
    – stabakunin
    Commented Mar 15, 2022 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.