Better error messaging w/ Ape and Brownie in the same environment
See original GitHub issueEnvironment information
- OS: linux
- Python Version: 3.8.10
ape
and plugin versions:
$ ape --version
# 0.3.5
$ ape plugins list
solidity 0.3.2
foundry 0.2.0
vyper 0.3.0
infura 0.3.0
alchemy 0.3.0
- Contents of your
ape-config.yaml
(NOTE: do not post anything private like RPC urls or secrets!):
$ cat ape-config.yaml
# name: gasJar
What went wrong?
Installed and trying to explore. I get this error on ape test. The docs mention an ape-test module, not sure if that’s separate… tried to install but that failed. Since this is a framework I assume that’s already in though. Beside the point tho.
Anyway. Installed. ape test fails with below trace. I don’t have the time to look into in atm. Feel free to close without response. Just wanted to dump this for potential future reference.
- ape test
`parseb@:~/Desktop/github/gasJar$ ape test
Traceback (most recent call last):
File "/home/parseb/.local/bin/ape", line 8, in <module>
sys.exit(cli())
File "/home/parseb/.local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/parseb/.local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/parseb/.local/lib/python3.8/site-packages/ape/_cli.py", line 40, in invoke
return super().invoke(ctx)
File "/home/parseb/.local/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/parseb/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/parseb/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/parseb/.local/lib/python3.8/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/parseb/.local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/parseb/.local/lib/python3.8/site-packages/ape_test/_cli.py", line 17, in cli
return_code = pytest.main([*pytest_args], ["ape_test"])
File "/home/parseb/.local/lib/python3.8/site-packages/_pytest/config/__init__.py", line 143, in main
config = _prepareconfig(args, plugins)
File "/home/parseb/.local/lib/python3.8/site-packages/_pytest/config/__init__.py", line 318, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/callers.py", line 203, in _multicall
gen.send(outcome)
File "/home/parseb/.local/lib/python3.8/site-packages/_pytest/helpconfig.py", line 100, in pytest_cmdline_parse
config: Config = outcome.get_result()
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/home/parseb/.local/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1003, in pytest_cmdline_parse
self.parse(args)
File "/home/parseb/.local/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1283, in parse
self._preparse(args, addopts=addopts)
File "/home/parseb/.local/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1172, in _preparse
self.pluginmanager.load_setuptools_entrypoints("pytest11")
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/manager.py", line 300, in load_setuptools_entrypoints
self.register(plugin, name=ep.name)
File "/home/parseb/.local/lib/python3.8/site-packages/_pytest/config/__init__.py", line 436, in register
ret: Optional[str] = super().register(plugin, name)
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/manager.py", line 127, in register
hook._maybe_apply_history(hookimpl)
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/hooks.py", line 333, in _maybe_apply_history
res = self._hookexec(self, [method], kwargs)
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/home/parseb/.local/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/home/parseb/.local/lib/python3.8/site-packages/brownie/test/plugin.py", line 50, in pytest_addoption
parser.addoption(
File "/home/parseb/.local/lib/python3.8/site-packages/_pytest/config/argparsing.py", line 96, in addoption
self._anonymous.addoption(*opts, **attrs)
File "/home/parseb/.local/lib/python3.8/site-packages/_pytest/config/argparsing.py", line 355, in addoption
raise ValueError("option names %s already added" % conflict)
ValueError: option names {'-I', '--interactive'} already added
`
How can it be fixed?
No clue.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Brownie - GitHub
A Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine. - GitHub - eth-brownie/brownie: A Python-based ...
Read more >phytools.pdf
se with the species specific sampling errors for x. Value. An object of class "brownie.lite" containing the following components:.
Read more >Brownie Recipe Peppermint Patties Pdf | Internships
Rather than reading a good book with a cup of tea in the afternoon, instead they juggled with some infectious bugs inside their...
Read more >piH - River Thames Conditions - Environment Agency - GOV.UK
2950 mckinney ave for sale, E41 error code affinity washer, Cirque zavatta animaux, ... What is the best adobe photoshop to buy, Patty...
Read more >GHIRARDELLI Salted Caramel Premium Brownie Mix, 16 Oz ...
DECADENTLY DELICIOUS: Indulge in rich, decadent GHIRARDELLI chocolate brownies perfectly paired with sweet and salty caramel. PREMIUM MIX: Our carefully ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds like you have Brownie installed in the same environment, which currently is not supported
Removing brownie ‘solves’ the issue. Having both in the same environment breaks both. Being aware, particularly given that most smart contract devs might not be python power users, is important.
Potentially other extra useful context, installing brownie in ape env. succeeds with: