Closed BlinkyStitt closed 1 month ago
I got more complete logs:
INFO: contract_deploy_tx: DynamicFeeTransaction:
chainId: 1
value: 0
data: 0x307836...323636
type: 2
accessList: []
ERROR: Problem retrieving traceback: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Traceback (most recent call last):
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn
sock = connection.create_connection(
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
raise err
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 496, in _make_request
conn.request(
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/urllib3/connection.py", line 400, in request
self.endheaders()
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/opt/homebrew/Cellar/python@3.10/3.10.13_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 976, in send
self.connect()
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/urllib3/connection.py", line 238, in connect
self.sock = self._new_conn()
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x16a6bd630>: Failed to establish a new connection: [Errno 61] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen
retries = retries.increment(
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=8545): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x16a6bd630>: Failed to establish a new connection: [Errno 61] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape_foundry/provider.py", line 566, in send_transaction
self.web3.eth.call(txn_params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/eth/eth.py", line 259, in call
return self._durin_call(transaction, block_identifier, state_override)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/eth/eth.py", line 278, in _durin_call
return self._call(transaction, block_identifier, state_override)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/module.py", line 75, in caller
result = w3.manager.request_blocking(
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/manager.py", line 325, in request_blocking
response = self._make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/manager.py", line 213, in _make_request
return request_func(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/gas_price_strategy.py", line 101, in middleware
return make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/formatting.py", line 126, in middleware
response = make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/attrdict.py", line 43, in middleware
response = make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/formatting.py", line 119, in middleware
web3_formatters_builder(w3, method),
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/validation.py", line 143, in build_method_validators
w3_chain_id = w3.eth.chain_id
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/eth/eth.py", line 147, in chain_id
return self._chain_id()
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/module.py", line 75, in caller
result = w3.manager.request_blocking(
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/manager.py", line 325, in request_blocking
response = self._make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/manager.py", line 213, in _make_request
return request_func(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/gas_price_strategy.py", line 101, in middleware
return make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/formatting.py", line 126, in middleware
response = make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/attrdict.py", line 43, in middleware
response = make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/formatting.py", line 126, in middleware
response = make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/formatting.py", line 126, in middleware
response = make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/buffered_gas_estimate.py", line 43, in middleware
return make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/middleware/exception_retry_request.py", line 125, in middleware
return make_request(method, params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/providers/rpc.py", line 90, in make_request
raw_response = make_post_request(
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/_utils/request.py", line 114, in make_post_request
response = get_response_from_post_request(endpoint_uri, data=data, *args, **kwargs)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/web3/_utils/request.py", line 107, in get_response_from_post_request
response = session.post(endpoint_uri, *args, **kwargs)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/requests/sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8545): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x16a6bd630>: Failed to establish a new connection: [Errno 61] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/bryan/code/flashprofits-ape/.venv/bin/ape", line 8, in <module>
sys.exit(cli())
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape/_cli.py", line 79, in invoke
return super().invoke(ctx)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape_run/_cli.py", line 74, in invoke
return super().invoke(ctx)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape/cli/commands.py", line 96, in invoke
return self._invoke(ctx, provider=provider)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape/cli/commands.py", line 133, in _invoke
return ctx.invoke(self.callback or (lambda: None), **ctx.params)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/Users/bryan/code/flashprofits-ape/scripts/prisma/arbitrage_v1.py", line 42, in cli
flash_wallet_v3 = get_or_create(project.FlashWalletV3, constructor_args=(sender.address,), sender=sender)
File "/Users/bryan/code/flashprofits-ape/ape_flashprofits/deploy_helpers.py", line 185, in get_or_create
tx = singleton_deployer.deploy(contract_initcode, salt, sender=sender, gas=deploy_estimate)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape/contracts/base.py", line 356, in __call__
return contract_transaction(*args, **kwargs)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape/contracts/base.py", line 290, in __call__
return kwargs["sender"].call(txn, **kwargs)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape/api/accounts.py", line 163, in call
else self.provider.send_transaction(signed_txn)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape_ethereum/provider.py", line 122, in send_tx_wrapper
receipt = send_tx(self, txn)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape_foundry/provider.py", line 568, in send_transaction
vm_err = self.get_virtual_machine_error(err, txn=receipt)
File "/Users/bryan/code/flashprofits-ape/.venv/lib/python3.10/site-packages/ape_foundry/provider.py", line 747, in get_virtual_machine_error
if message.startswith(foundry_prefix):
AttributeError: 'MaxRetryError' object has no attribute 'startswith'
INFO: Stopping 'anvil' process.
Environment information
ape
and plugin versions:What went wrong?
I'm writing a contract that has some bugs so it currently reverts. The trace logs show as expected, but one time I ran it, I got this error:
How can it be fixed?
I haven't dug into the ape code yet, but I think the error handler at
ape_foundry/provider.py, line 747
is expecting a string but we have an error object.