Skip to content

Commit

Permalink
fix: url quote function and full domain name
Browse files Browse the repository at this point in the history
  • Loading branch information
jrriehl committed Oct 29, 2024
1 parent 66b746d commit a9d143a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions python/examples/13-agent-name-service/agent1.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class Message(Model):
message: str


DOMAIN = "example.agent"
DOMAIN = "bob.example.agent"

bob = Agent(
name="bob-0",
name="bob",
domain=DOMAIN,
seed="agent bob-0 secret phrase",
port=8001,
Expand All @@ -24,7 +24,6 @@ class Message(Model):
my_wallet = LocalWallet.from_unsafe_seed("registration test wallet")
name_service_contract = get_name_service_contract(test=True)
faucet = get_faucet()
DOMAIN = "example.agent"

logger.info(f"Adding testnet funds to {my_wallet.address()}...")
faucet.get_wealth(my_wallet.address())
Expand Down
3 changes: 2 additions & 1 deletion python/src/uagents/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Type,
Union,
)
from urllib.parse import quote

import requests
from cosmpy.aerial.client import LedgerClient
Expand Down Expand Up @@ -1193,7 +1194,7 @@ async def start_server(self):
f"{self._agentverse['http_prefix']}://{self._agentverse['base_url']}"
)
inspector_url = f"{agentverse_url}/inspect/"
escaped_uri = requests.utils.compat.quote(f"http://127.0.0.1:{self._port}")
escaped_uri = quote(f"http://127.0.0.1:{self._port}")
self._logger.info(
f"Agent inspector available at {inspector_url}"
f"?uri={escaped_uri}&address={self.address}"
Expand Down

0 comments on commit a9d143a

Please sign in to comment.