fetchai / uAgents

A fast and lightweight framework for creating decentralized agents with ease.
Apache License 2.0
870 stars 228 forks source link

Bug in agent example readme.md #395

Closed tomekstrzeszkowski closed 4 months ago

tomekstrzeszkowski commented 4 months ago

Seems the context doesn't have name attribute

ERROR:    [alice]: Exception in interval handler: 'InternalContext' object has no attribute 'name'
Traceback (most recent call last):
  File "/Users/tomasz.strzeszkowski/.pyenv/versions/3.11.2/lib/python3.11/site-packages/uagents/agent.py", line 73, in _run_interval
    await func(ctx)
  File "<stdin>", line 3, in say_hello
AttributeError: 'InternalContext' object has no attribute 'name'

it should call context.agent.name

PR for that

Archento commented 4 months ago

PR has been merged. Thanks again for your contribution!