valory-xyz / trader-quickstart

A quickstart for the trader agent for AI prediction markets on Gnosis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Receiving 'KeyError: tool' when trying to run commands to observe agents (report.py & trades.py)

VinceLindsey opened this issue · comments

Traceback (most recent call last):
File "/Users/[redacted]/Documents/GitHub/trader-quickstart/trader/../report.py", line 212, in
mech_statistics = trades.get_mech_statistics(mech_requests)
File "/Users/[redacted]/Documents/GitHub/trader-quickstart/trades.py", line 757, in get_mech_statistics
if mech_request["ipfs_contents"]["tool"] in IRRELEVANT_TOOLS:
KeyError: 'tool'

I checked against current main (c96722a) and cannot replicate this. What commit are you on and what sequence of steps led to this?

I am on commit c96722a as well, working on my branch. Everything was working fine before I upgraded to v0.11.3. I can run and stop the service fine, but whenever I run cd trader; poetry run python ../report.py; cd .. or cd trader; poetry run python ../trades.py MY_SAFE_ADDRESS; cd .., I receive that message.

I haven't been able to replicate it locally either. However a fix to add guard clauses has been implemented to prevent the script from crashing: #187