You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using SDK to create a basic chat bot and add neccessary scopes in manifest.json to sideload the bot in M365 Copilot. Try to conversation with the bot agent, get the error.
[on_turn_error] unhandled error: 'text'
Traceback (most recent call last):
File "c:\Users\frankqian\TeamsApps\test11\.venv\Lib\site-packages\botbuilder\core\bot_adapter.py", line 174, in run_pipeline
return await self._middleware.receive_activity_with_status(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\frankqian\TeamsApps\test11\.venv\Lib\site-packages\botbuilder\core\middleware_set.py", line 69, in receive_activity_with_status
return await self.receive_activity_internal(context, callback)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\frankqian\TeamsApps\test11\.venv\Lib\site-packages\botbuilder\core\middleware_set.py", line 79, in receive_activity_internal
return await callback(context)
^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\frankqian\TeamsApps\test11\.venv\Lib\site-packages\teams\app.py", line 745, in on_turn
await self._start_long_running_call(context, self._on_turn)
File "c:\Users\frankqian\TeamsApps\test11\.venv\Lib\site-packages\teams\app.py", line 903, in _start_long_running_call
return await func(context)
^^^^^^^^^^^^^^^^^^^
File "c:\Users\frankqian\TeamsApps\test11\.venv\Lib\site-packages\teams\app.py", line 751, in _on_turn
self._remove_mentions(context)
File "c:\Users\frankqian\TeamsApps\test11\.venv\Lib\site-packages\teams\app.py", line 786, in _remove_mentions
context.activity.text = context.remove_recipient_mention(context.activity)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\frankqian\TeamsApps\test11\.venv\Lib\site-packages\botbuilder\core\turn_context.py", line 392, in remove_recipient_mention
return TurnContext.remove_mention_text(activity, activity.recipient.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\frankqian\TeamsApps\test11\.venv\Lib\site-packages\botbuilder\core\turn_context.py", line 401, in remove_mention_text
escape(mention.additional_properties["text"]),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'text'
Reproduction Steps
repro-noresponse-in-copilot.mp4
1.clone the bot repo from this link.https://github.com/frankqianms/basic-py
2.open the project using Teams Toolkit in vs code.
3.input neccessary api_key, deployment model name, endpoint in .env.local.user
4.launch debug with “Debug in Teams(Desktop)”
5.in Teams Copilot channel, try to start converstion
6.get the error
...
The text was updated successfully, but these errors were encountered:
Checking the stack trace pasted - it looks like the bug is being thrown on Botbuilder? Do you have a screenshot/video of the bug? Looks like there's no text associated with the activity from quick glance
lilyydu
added
the
Python
Change/fix applies to Python. If all three, use the 'JS & dotnet & Python' label
label
Feb 27, 2025
Language
Python
Version
latest
Description
Using SDK to create a basic chat bot and add neccessary scopes in manifest.json to sideload the bot in M365 Copilot. Try to conversation with the bot agent, get the error.
Reproduction Steps
repro-noresponse-in-copilot.mp4
The text was updated successfully, but these errors were encountered: