fetchai / uAgents

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

docs(core): example in readme #396

Closed tomekstrzeszkowski closed 4 months ago

tomekstrzeszkowski commented 4 months ago

Proposed Changes

Bugfix in readme

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'

Issues

https://github.com/fetchai/uAgents/issues/395

Types of changes

What types of changes does the pull request introduce? Put an x in the boxes that apply:

Checklist

Put an x in the boxes that apply:

If applicable

Further comments

(If this is a relatively large or complex change, kick off a discussion by explaining why you chose the solution you did, what alternatives you considered, etc...).

Joshi-Parth commented 4 months ago

The official documentation still references ctx.name instead of ctx.agent.name. Should this be updated too?