Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: meta.update() fails when meta = None #599

Closed
zoltan-fedor opened this issue Apr 18, 2024 · 1 comment
Closed

bug: meta.update() fails when meta = None #599

zoltan-fedor opened this issue Apr 18, 2024 · 1 comment

Comments

@zoltan-fedor
Copy link
Contributor

This was incorrectly filed against the langfuse repo first (see langfuse/langfuse#1775)

Describe the bug

I believe this Commit da264a9 from last week has introduced a bug at https://github.com/langfuse/langfuse-python/blame/main/langfuse/callback/langchain.py#L722 by allowing returning None (edit: it seems the version before the commit has also allowed returning None, so it is interesting why I only see this now), which then fails at https://github.com/langfuse/langfuse-python/blame/main/langfuse/callback/langchain.py#L445, as None doesn't have an update() method

To reproduce

Run a callback with no metadata or tags and you will hit an error:

File "/..../lib/python3.10/site-packages/langfuse/callback/langchain.py", line 443, in on_tool_start
    meta.update(
    └ None

Additional information

No response

marcklingen pushed a commit that referenced this issue Apr 18, 2024
marcklingen added a commit that referenced this issue Apr 18, 2024
Co-authored-by: Zoltan Fedor <zoltan.0.fedor@gmail.com>
@marcklingen
Copy link
Member

thanks for your contribution on this 🙏 released in https://github.com/langfuse/langfuse-python/releases/tag/v2.27.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants