Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ape compile fails with 0.8.9, but not with 0.8.8 #150

Open
martinkrung opened this issue Feb 28, 2025 · 1 comment
Open

ape compile fails with 0.8.9, but not with 0.8.8 #150

martinkrung opened this issue Feb 28, 2025 · 1 comment

Comments

@martinkrung
Copy link

Environment information

  • ape and plugin versions:
$ ape --version
0.8.29


$ ape plugins list
Installed Plugins
  alchemy      0.8.8
  ens          0.8.2
  etherscan    0.8.4
  foundry      0.8.7
  hardhat      0.8.5
  infura       0.8.4
  solidity     0.8.5
  template     0.8.0
  tokens       0.8.4
  vyper        0.8.9
  • Python Version: 3.12.3
  • OS: linux

What went wrong?

vyper contract/some.vy runs fine

BUT

ape compile fails with this:

 ape compile
INFO:     Compiling using Vyper compiler '0.4.0'.
Input:
	contracts/Passthrough.vy

  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/ape/_cli.py", line 86, in invoke
    return super().invoke(ctx)
           ^^^^^^^^^^^^^^^^^^^
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/ape_compile/_cli.py", line 71, in cli
    for k, v in project.load_contracts(*file_paths, use_cache=use_cache).items()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/ape/managers/project.py", line 2562, in load_contracts
    new_types = {
                ^
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/ape/managers/project.py", line 498, in _compile
    self._compile_contracts(needs_compile)
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/ape/managers/project.py", line 454, in _compile_contracts
    new_types := {
                 ^
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/ape/managers/compilers.py", line 163, in compile
    raise errors[0]
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/ape/managers/compilers.py", line 142, in compile
    for contract in compiler.compile(path_set, project=pm, settings=compiler_settings):
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/ape_vyper/compiler/api.py", line 253, in compile
    yield from self._compile(contract_filepaths, project=pm)
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/ape_vyper/compiler/api.py", line 275, in _compile
    for contract_type, settings_key in sub_compiler.compile(
  File "$HOME/somefolder/.venv/lib/python3.12/site-packages/ape_vyper/compiler/_versions/vyper_04.py", line 169, in compile
    raise VyperCompileError(err) from err

ERROR:    (VyperCompileError) FileNotFoundError: [Errno 2] No such file or directory: '/home/someuser/somefolder/.venv/local'

How can it be fixed?

pip install ape-vyper==0.8.8

with this version ape compile works fine

Copy link

linear bot commented Feb 28, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant