5

I was thinking that the issue was related to the versioning of the release but after used the last version of all packages imported I have the same issue.

Can someone help me with this?

Brownie v1.17.1 - Python development framework for Ethereum

  File "C:\Users\ssida\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\_cli\__main__.py", line 64, in main    
    importlib.import_module(f"brownie._cli.{cmd}").main()
  File "C:\Users\ssida\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\_cli\compile.py", line 50, in main     
    proj = project.load()
  File "C:\Users\ssida\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 751, in load    
    return Project(name, project_path)
  File "C:\Users\ssida\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 183, in __init__    self.load()
  File "C:\Users\ssida\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 238, in load    
    self._compile(changed, self._compiler_config, False)
  File "C:\Users\ssida\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 90, in _compile 
    _install_dependencies(self._path)
  File "C:\Users\ssida\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 757, in _install_dependencies
    install_package(package_id)
  File "C:\Users\ssida\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 779, in install_package
    return _install_from_github(package_id)
  File "C:\Users\ssida\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 841, in _install_from_github
    download_url = _get_download_url_from_tag(org, repo, version, headers)
  File "C:\Users\ssida\.local\pipx\venvs\eth-brownie\lib\site-packages\brownie\project\main.py", line 904, in _get_download_url_from_tag
    raise ConnectionError(msg)
ConnectionError: Status 404 when getting package versions from Github: 'Not Found'

Missing or forbidden.
If this issue persists, generate a Github API token and store it as the environment variable `GITHUB_TOKEN`:
https://github.blog/2013-05-16-personal-api-tokens/
PS C:\Users\ssida\Documents\GitHub\defi-fullstack-app> 

When I lunch - brownie compile, I have this issue. Attached the screen

enter image description here


EDIT


thank you for the hint - below my brownie-cofing.yaml

project_structure:
    build: build
    contracts: contracts
    interfaces: interfaces
    reports: reports
    scripts: scripts
    tests: tests

networks:
    default: development
    development:
        gas_limit: max
        gas_buffer: 1
        gas_price: 0
        max_fee: null
        priority_fee: null
        reverting_tx_gas_limit: max
        default_contract_owner: true
        cmd_settings: null
    verify: False
      ganache:
    verify: False
      kovan:
    verify: True
    weth_token: "my address token/"
    fau_token: "my address token/"
    
    live:
        gas_limit: auto
        gas_buffer: 1.1
        gas_price: auto
        max_fee: null
        priority_fee: null
        reverting_tx_gas_limit: false
        default_contract_owner: false

compiler:
    evm_version: null
    solc:
        version: null
        optimizer:
            enabled: true
            runs: 200
        remappings: -'@openzeppelin = OpenZeppelin/openzeppelin-contracts@4.3.2';
    vyper:
        version: null

console:
    show_colors: true
    color_style: monokai
    auto_suggest: true
    completions: true
    editing_mode: emacs

reports:
    exclude_paths: null
    exclude_contracts: null
    only_include_project: true

hypothesis:
    deadline: null
    max_examples: 50
    report_multiple_bugs: False
    stateful_step_count: 10
    phases:
        explicit: true
        reuse: true
        generate: true
        target: true
        shrink: true

autofetch_sources: false
dependencies:
  - OpenZeppelin/openzeppelin-contracts@4.3.2
  - smartcontract/chainlink-brownie-contracts@0.2.1
dev_deployment_artifacts: false

SOLVED Installed library for secure smart contract development. Build on a solid foundation of community-vetted code.

$ npm install @openzeppelin/contracts

  • Please paste the error text into the question instead of an image. – eglease Nov 14 '21 at 17:12
  • 1
    @eglease done, I have a problem on compile the code. i don't understand what is going wrong –  Nov 14 '21 at 18:36
  • 1
    I've seen this a few times. Started a bounty. Thanks for posting. – Patrick Collins Nov 16 '21 at 17:23
  • judging by mistake, to solve your problem, you need to set up a personal API key from the github, but perhaps I did not understand the context. If my guess did not help, then add a sequence of steps. – ilyar Nov 17 '21 at 10:55
  • Can you pull/push anything from/to Github or is the issue isolated for this one? – MikeBird Nov 17 '21 at 15:42
  • @everyone I already reset my token - also I tried to create a new token (read and write) but I still have this issue. seems that it does not let me download packages. –  Nov 17 '21 at 18:47
  • @MikeBird.eth even if I pull everything brownie does not let me compile my smart contracts. I'm trying to do reverse engineering to find the broken root –  Nov 17 '21 at 18:49
  • 1
    @PatrickCollins Thank you for the incredible resources for the blockchain ecosystem/community :) –  Nov 17 '21 at 19:12
  • Any chance you've been able to solve this yet? – Patrick Collins Nov 19 '21 at 01:53
  • I tried to get the dependencies from avee and had the same the issue. I double checked my brownie-config.yml in order to find any type or whatever and it was correct. So, I had to add the code manually and set the compiler to 0.5.0. Now, the project compiles. We'll see then if it works. – Ignacio Giagante Feb 16 '22 at 16:12

4 Answers4

6

I faced this error several times when I had a typo in my brownie-config.yaml... hopefully this helps.

RFö
  • 88
  • 5
  • Can you elaborate? – Patrick Collins Nov 17 '21 at 21:57
  • Great Hint! I was wondering if I have to declare all variables possible in my brownie-config.yaml file (ie. https://eth-brownie.readthedocs.io/en/stable/config.html#config) can you please make me an example in order to apply your suggestion? thank you! –  Nov 18 '21 at 00:11
  • read post update! –  Nov 18 '21 at 00:18
  • I'm pretty new to solidity programming but one occasion of me getting this error was when I did something like misspelling openzeppelin in the dependencies. Sorry for taking so long to answer btw. – RFö Nov 26 '21 at 14:16
2

So I had the same issue, the fix was something simple that I overlooked and thought I would post here for anyone else who may need the same fix as simple as it is:

Originally:

dependencies:
   -smartcontractkit/chainlink......

Fixed:

depedencies:
   - smartcontractkit/chainlink......

I just needed to add a space after the hyphen

Axceus
  • 407
  • 3
  • 7
1

A mistake in my brownie-config.yaml caused the problem for me, i typed

- smartcontractkit/chainlink-brownie-contract@0.2.1

instead of having

- smartcontractkit/chainlink-brownie-contracts@0.2.1

to clarify i typed 'contract' when it needed to be 'contracts', hope this helps someone.

fulo
  • 95
  • 1
  • 7
0

For me this issue was caused by mispelling openzeppelin in my brownie-config.yml file I hade left out the third e in openzeppelin in my brownie-config dependencies and remappings variables. fixed by changing

openzepplin 

to

openzeppelin 

in those variables.

  - smartcontractkit/chainlink-brownie-contracts@1.1.1
  - OpenZeppelin/openzeppelin-contracts@3.4.0
compiler:
  solc:
    remappings:
      - '@chainlink=smartcontractkit/chainlink-brownie-contracts@1.1.1'
      - '@openzeppelin=OpenZeppelin/openzeppelin-contracts@3.4.0'```
CodeLife
  • 89
  • 6