-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
ImportError: cannot import name 'tracing_enabled' from 'langchain_core.tracers.context' (/usr/local/lib/python3.11/site-packages/langchain_core/tracers/context.py #15526
Comments
🤖 Hey @adarshkrpf! I'm Dosu, a friendly bot here to lend you a hand with your LangChain issues while we wait for the human maintainers. I can assist with debugging, answering queries, or guiding you on how to contribute to the project. Let's dive into solving things together! Based on the context provided, it appears that the 'tracing_enabled' you're trying to import from 'langchain_core.tracers.context' does not exist in the LangChain versions 0.0.352 and 0.0.353. This is likely the cause of the ImportError you're encountering. The closest match to 'tracing_enabled' in the provided context is the function 'tracing_v2_enabled'. If you intended to use this function, you should import 'tracing_v2_enabled' instead of 'tracing_enabled'. If 'tracing_enabled' is indeed what you intended to import, it might be located in a different module or it might not exist at all. I recommend checking your code and the LangChain documentation for the correct import statement. Unfortunately, I couldn't find any specific changes made to the 'langchain_core.tracers.context' module in the LangChain versions 0.0.352 and 0.0.353. It's possible that the 'tracing_enabled' was removed or renamed in these versions. If you're still encountering issues, could you please provide more details about your custom _call wrapper and how you're using 'tracing_enabled'? This will help me understand your issue better and provide a more accurate solution. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Facing same issue even though I did not change anything in my running code. |
Found the issue: The commit itself handled the lingering dependencies correctly. however, the function deletion was included in langchain-core 0.1.5, and is being referred to by v0.0.353, which didn't clean up the dependencies yet, not until 0.0.354 I haven't tried yet, but upgrading to 0.0.354 should resolve the issue. |
As @xkaiDu mentioned, this issue was caused by an incompatibility between older versions of We've fixed this issue in So to resolve, either:
Closing issue, but if the above don't work for anyone please let us know! |
We've also yanked 0.1.5 |
System Info
0.0.352 and 0.0.353
Who can help?
No response
Information
Related Components
Reproduction
Custom _call wrapper
Expected behavior
No import error
The text was updated successfully, but these errors were encountered: