0

I have just tried a lot of things but i can't fix it. I am trying to run a simple strands tool calculator in 3 different jupyter environments and I always get the same error

"Error: LookupError - <ContextVar name='parent_header' at 0x725c0c393f10>"

If I run it as a python script it in the same env it runs just fine.

Normal agent calls works it is just the strand tools that don't work, for example:

agent.tool.calculator(expression="sin(x)")
3
  • I'd advise reading How do I ask a good question?, especially the section emphasized with the bold 'Help others reproduce the problem'. There it discusses the concept of providing a minimal, reproducible example. Do you mean from Strands Agents Tools? Can you provide an example based on code they provide there? Under 'Fundamentals', I see a lot of stuff about streaming and connecting. Is it ... Commented Oct 26 at 17:10
  • <continued> possible that you set things up in the env where it works but Jupyter isn't seeing that stuff? Often Jupyter actually runs the kernel backing it in an environment separate and you need to actively connect it. Just starting things with the environment activated isn't enough to connect Jupyter. Commented Oct 26 at 17:14
  • 1
    Ok, Today I started some new env and worked. I think some mismatch in the notebook version or something. I can't reproduce it anymore,. Commented Oct 28 at 7:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.