O365Toolkit
is not fully defined; you should define Account
, then call O365Toolkit.model_rebuild()
#26743
Replies: 5 comments 6 replies
-
Hey there, @Muntasir2179! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this issue together! Hey @Muntasir2179! It looks like you're diving deep into some technical waters with |
Beta Was this translation helpful? Give feedback.
-
PydanticUserError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/pydantic/_internal/_mock_val_ser.py in getattr(self, item) PydanticUserError: For further information visit https://errors.pydantic.dev/2.10/u/class-not-fully-defined |
Beta Was this translation helpful? Give feedback.
-
Any update on this error? Frustrating ! |
Beta Was this translation helpful? Give feedback.
-
Yes I was able to solve the issue: ' ' ' Initialize the account with correct scopesaccount = Account(credentials=( Authenticateif account.authenticate():
else: |
Beta Was this translation helpful? Give feedback.
-
unauthorized_client: The client does not exist or is not enabled for consumers. If you are the application developer, configure a new application through the App Registrations in the Azure Portal at https://go.microsoft.com/fwlink/?linkid=@#$@#$@ |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
I am trying to use
O365Toolkit
toolkit provided by langchain. I have followed the required steps like registering app and settingCLIENT_ID
andCLIENT_SECRET
environment variables. After do all these I have run the script accessing the tools and got the error message.Error message:
Traceback (most recent call last):
File "/home/muntasir/Desktop/customer-support-chatbot/test.py", line 5, in
toolkit = O365Toolkit()
^^^^^^^^^^^^^
File "/home/muntasir/.miniconda3/envs/chatbot/lib/python3.12/site-packages/pydantic/main.py", line 209, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/muntasir/.miniconda3/envs/chatbot/lib/python3.12/site-packages/pydantic/_internal/_mock_val_ser.py", line 99, in getattr
raise PydanticUserError(self._error_message, code=self._code)
pydantic.errors.PydanticUserError:
O365Toolkit
is not fully defined; you should defineAccount
, then callO365Toolkit.model_rebuild()
.For further information visit https://errors.pydantic.dev/2.9/u/class-not-fully-defined
System Info
Here is the libraries and their versions that I am using:
requirements.txt
Beta Was this translation helpful? Give feedback.
All reactions