I initialized a new brownie project via the terminal by

$ brownie init

I wrote the following script in python:

def simple_print():
    print("Hello World!")

def main():

saved it as deploy.py in the srcipts folder and then ran the following command in the terminal:

$ brownie run scripts/deploy.py

and got the following error:

INFO: Could not find files for the given pattern(s).
Brownie v1.18.1 - Python development framework for Ethereum

BrownieSimpleStorageProject is the active project.

Launching 'ganache-cli.cmd --chain.vmErrorsOnRPCResponse true --server.port 8545 --miner.blockGasLimit 12000000 --wallet.totalAccounts 10 --hardfork istanbul --wallet.mnemonic brownie'...
  File "C:\Users\kashy\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\_cli\run.py", line 51, in main
    return_value, frame = run(
  File "C:\Users\kashy\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\scripts.py", line 53, in run
    module = _import_from_path(script)
  File "C:\Users\kashy\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\scripts.py", line 149, in _import_from_path
    _import_cache[import_str] = importlib.import_module(import_str)
  File "C:\Users\kashy\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 122, in import_module
    raise TypeError(msg.format(name))
TypeError: the 'package' argument is required to perform a relative import for '.Works..CS.Web3.brownie_simple_storage.scripts.deploy'
Terminating local RPC client...

Been at this for 4 days now, cannot find a solution. Please advise.

1 Answer 1


Check that the port numbers are the same between GUI and CLI. I was able to fix by going into Ganache (GUI) settings -> server and reset the port to 8545. Save and restart. Brownie should attach next time you run your deploy script.

Your Answer

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

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