eth-brownie / brownie

A Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.
https://eth-brownie.readthedocs.io
MIT License
2.65k stars 553 forks source link

INFO: Could not find files for the given pattern(s). #1307

Open ojonma opened 3 years ago

ojonma commented 3 years ago

Environment information

What was wrong?

my brownie installation seems to be ok but when I try brownie initI get an error.

Hello@DESKTOP-LJICC0M MINGW64 ~ $ brownie init INFO: Could not find files for the given pattern(s). Brownie v1.16.4 - Python development framework for Ethereum

File ".\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie_cli__main__.py", line 64, in main importlib.import_module(f"brownie._cli.{cmd}").main() File ".\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie_cli\init.py", line 31, in main path = project.new(args[""] or ".", args["--force"], args["--force"]) File ".\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie\project\main.py", line 584, in new raise FileExistsError(f"Directory is not empty: {project_path}") FileExistsError: Directory is not empty: C:\Users\Hello

How can it be fixed?

ojonma commented 3 years ago

Do i have to change the location of my Virtual Environment

Hello@DESKTOP-LJICC0M MINGW64 ~ $ pipx usage: pipx [-h] [--version] {install,inject,upgrade,upgrade-all,uninstall,uninstall-all,reinstall,reinstall-all,list,run,runpip,ensurepath,completions} ...

Install and execute apps from Python packages.

Binaries can either be installed globally into isolated Virtual Environments or run directly in a temporary Virtual Environment.

Virtual Environment location is C:\Users\Hello.local\pipx\venvs. Symlinks to apps are placed in C:\Users\Hello.local\bin.

optional environment variables: PIPX_HOME Overrides default pipx location. Virtual Environments will be installed to $PIPX_HOME/venvs. PIPX_BIN_DIR Overrides location of app installations. Apps are symlinked or copied here. USE_EMOJI Overrides emoji behavior. Default value varies based on platform. PIPX_DEFAULT_PYTHON Overrides default python used for commands.

sandhya-msc commented 2 years ago

Facing the same ISSUE

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

gnattishness commented 2 years ago

Try using python 3.9.x. Brownie does not currently support 3.10 - at least because the vyper dependency doesn't yet (see https://github.com/vyperlang/vyper/issues/2548)

gnattishness commented 2 years ago

Also note explanation in #1371

ojonma commented 2 years ago

i have downloaded 3-9-x, i no longer get error message. i try to bake nft-mix it didnt work.

Hello@DESKTOP-LJICC0M MINGW64 ~ $ brownie bake nft-mix Brownie v1.17.2 - Python development framework for Ethereum

Downloading from https://github.com/brownie-mix/nft-mix/archive/main.zip...

Hello@DESKTOP-LJICC0M MINGW64 ~ $

Try using python 3.9.x. Brownie does not currently support 3.10 - at least because the vyper dependency doesn't yet (see vyperlang/vyper#2548)

gnattishness commented 2 years ago

Hello@DESKTOP-LJICC0M MINGW64 ~ $ brownie init INFO: Could not find files for the given pattern(s). Brownie v1.16.4 - Python development framework for Ethereum

File ".\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie_climain.py", line 64, in main importlib.import_module(f"brownie._cli.{cmd}").main() File ".\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie_cli\init.py", line 31, in main path = project.new(args[""] or ".", args["--force"], args["--force"]) File ".\AppData\Local\Programs\Python\Python310\lib\site-packages\brownie\project\main.py", line 584, in new raise FileExistsError(f"Directory is not empty: {project_path}") FileExistsError: Directory is not empty: C:\Users\Hello

As the error explains, I'd imagine the folder you were running brownie init from was not empty. As described in the docs (https://eth-brownie.readthedocs.io/en/stable/init.html#creating-an-empty-project), brownie init is intended for use in a new (empty) directory. I'm not clear on what shell you use (cmd, powershell?) but you'd want to create a new folder to hold your project. e.g.

$ mkdir projectName
$ cd projectName
$ brownie init
gnattishness commented 2 years ago

Also, please note that github issues are not the intended medium for asking how to use brownie (See https://github.com/eth-brownie/brownie/blob/master/.github/ISSUE_TEMPLATE/support.md ) Please only create an issue if you think there's a bug or you have some feature request (as explained in the issue templates).

This will help the maintainer(s) spend their limited time more effectively :) and keep the github issues associated with actually developing/maintaining the software

gnattishness commented 2 years ago

Hello@DESKTOP-LJICC0M MINGW64 ~ $ brownie bake nft-mix Brownie v1.17.2 - Python development framework for Ethereum ...

You haven't provided any error messages or other information that we could use to help you here. But:

  1. This is a separate topic to your original issue (IMO)
  2. It would be more appropriate to ask on stack overflow etc