SlackToolkit Problem - sample code does not work #28566
Replies: 8 comments 2 replies
-
The last line gives: Traceback (most recent call last): For further information visit https://errors.pydantic.dev/2.10/u/class-not-fully-defined I'm not sure if this code addition is needed as the sample code talks just about: from langchain_community.agent_toolkits import SlackToolkit toolkit = SlackToolkit() |
Beta Was this translation helpful? Give feedback.
-
try update the pydantic to the lastest version:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for trying to help. Updated pedantic and still the same message... Does it just work on your side? It is so strange. Just 3-4 lines of code and luck... |
Beta Was this translation helpful? Give feedback.
-
I've tried that before:
I'm just wondering if it works for anyone as described in the doc... |
Beta Was this translation helpful? Give feedback.
-
Renewed my token. Still the same problem |
Beta Was this translation helpful? Give feedback.
-
Well. I've been using Python 3.12 (the same I use for this test) for a long time with many langchain and langgraphs projects without any problem. Unfortunately downgrading is not an option for me. I'm also skeptical that it might be related. I'm just wondering how langchain could release something so untested - and I see that this Slack toolkit is available since langchain 0.1. So something is really weird here.... |
Beta Was this translation helpful? Give feedback.
-
I have the same problem as edwardgonen |
Beta Was this translation helpful? Give feedback.
-
I can replicate this and believe it is related to an update in Pydantic's validation. Created an issue to track: #28989 PR to resolve: #28990 |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
I have the
SLACK_USER_TOKEN= set correctly and installed all the needed packages including slack_sdk
But the SlackToolkin() gives exception:
Exception has occurred: PydanticUserError
SlackToolkit
is not fully defined; you should defineWebClient
, then callSlackToolkit.model_rebuild()
.For further information visit https://errors.pydantic.dev/2.10/u/class-not-fully-defined
File "/Users/user/Projects/slack/main.py", line 13, in
toolkit = SlackToolkit()
^^^^^^^^^^^^^^
pydantic.errors.PydanticUserError:
SlackToolkit
is not fully defined; you should defineWebClient
, then callSlackToolkit.model_rebuild()
.For further information visit https://errors.pydantic.dev/2.10/u/class-not-fully-defined
I've tried to add WebClient but then fail on get_tools().
Can anyone help?
System Info
langchain==0.3.8
langchain-anthropic==0.3.0
langchain-community==0.3.8
langchain-core==0.3.21
langchain-experimental==0.3.3
langchain-openai==0.2.10
langchain-text-splitters==0.3.2
MAC
Python 3.12.3
Beta Was this translation helpful? Give feedback.
All reactions