File "/ws/mamoozad-sjc/CATS/cats/webex/commands/ut_xr.py", line 73, in execute
return response_from_adaptive_card(card)
File "/ws/mamoozad-sjc/CATS/cats/webex/models/response.py", line 19, in response_from_adaptive_card
"content": adaptive_card.to_dict()
File "/auto/panini-projs/fabric/spitfire/cats_venv/3.9.10/env/lib/python3.9/site-packages/webexteamssdk/models/cards/card.py", line 85, in to_dict
serialized_data = super().to_dict()
File "/auto/panini-projs/fabric/spitfire/cats_venv/3.9.10/env/lib/python3.9/site-packages/webexteamssdk/models/cards/adaptive_card_component.py", line 78, in to_dict
serialized_data[property_name] = [
File "/auto/panini-projs/fabric/spitfire/cats_venv/3.9.10/env/lib/python3.9/site-packages/webexteamssdk/models/cards/adaptive_card_component.py", line 79, in <listcomp>
item.to_dict() for item in property_value
File "/auto/panini-projs/fabric/spitfire/cats_venv/3.9.10/env/lib/python3.9/site-packages/webexteamssdk/models/cards/adaptive_card_component.py", line 78, in to_dict
serialized_data[property_name] = [
File "/auto/panini-projs/fabric/spitfire/cats_venv/3.9.10/env/lib/python3.9/site-packages/webexteamssdk/models/cards/adaptive_card_component.py", line 79, in <listcomp>
item.to_dict() for item in property_value
File "/auto/panini-projs/fabric/spitfire/cats_venv/3.9.10/env/lib/python3.9/site-packages/webexteamssdk/models/cards/adaptive_card_component.py", line 78, in to_dict
serialized_data[property_name] = [
File "/auto/panini-projs/fabric/spitfire/cats_venv/3.9.10/env/lib/python3.9/site-packages/webexteamssdk/models/cards/adaptive_card_component.py", line 79, in <listcomp>
item.to_dict() for item in property_value
File "/auto/panini-projs/fabric/spitfire/cats_venv/3.9.10/env/lib/python3.9/site-packages/webexteamssdk/models/cards/adaptive_card_component.py", line 78, in to_dict
serialized_data[property_name] = [
File "/auto/panini-projs/fabric/spitfire/cats_venv/3.9.10/env/lib/python3.9/site-packages/webexteamssdk/models/cards/adaptive_card_component.py", line 79, in <listcomp>
item.to_dict() for item in property_value
AttributeError: 'dict' object has no attribute 'to_dict'
From looking at the code, it looks like the items in Choices['choices'] should be choice class objects, rather than raw dictionaries. They would then inherit toDict() from the parent AdaptiveCardComponent.
I get error while adding choices into my card:
Here is the error:
Am I using the Choices correctly?