[Solved] - Problem to invoke dry-run endpoint from python in local network

Hello everyone, I have a problem with the dry-run endpoint in the local network. I use aeproject with python-sdk 7.0.0 and python 3.8.2.
The problem was when invoke a dry-run function, for example get_something() and the message i get was:

requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘127.0.0.1’, port=3113): Max retries exceeded with url: /v2/debug/transactions/dry-run (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x10f73f4f0>: Failed to establish a new connection: [Errno 61] Connection refused’))

Ofcorse I have the docker run ok.

e95e7e6915bb aeternity/aeternity:v5.4.1 “bin/aeternity conso…” 38 minutes ago Up 38 minutes (healthy) 3013-3015/tcp, 3113/tcp drg-blockchain_node1_1

In my ContractNative put use_dry_run=True (also when I know that’s for default)

and for example, in my smart contract I define de next function that I will invoke from python

entrypoint get_state_index() : int =
state.index

Thanks for help me.

I’m sorry, I solved.
It was a problem with the this example:
Interacting with a contract - python-sdk
Where It’s wrong the explication with the flag in the ContractNative :
“”"
Initialize the contract instance
Note: To disable use of dry-run endpoint add the parameter
use_dry_run=False
“”"
It is the opposite.
If you want to use dry-run endpoint, you need to put the flag use_dry_run=False in the ContractNative contructor.

In the example must be like this:

crypto_hamster = ContractNative(client=node_cli,
compiler=compiler,
account=alice,
source=crypto_hamster_contract,
use_dry_run=False)

Thanks @gnardone_uy, we will fix this