-
Notifications
You must be signed in to change notification settings - Fork 152
Cards example doesn't work #106
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
Comments
@acilate , I tried to import the cards the way you mentioned but I get this error:
How did you work around that? |
So, I think this is another bug, but I didn't want to take the time to report it :) You cannot serialize that object for some reason and I couldn't figure it out. For several issues like this one, I ended up just building a native python data object:
|
alright, you might know about this already but checkout pyadaptivecards here. |
I have found this works
|
Example doesn't work if you have a Submit action and provide "data" dictionary. Get error that 'dict' object has no attribute 'to_dict'. They claimed to have fixed this issue with pyadaptivecards, but it's not fixed. |
Let's either:
...or you could refactor pyadaptivecards, and we can refer people to the library. 😎 @sQu4rks, what do you think? |
@cmlccie this is the same as issue #107 which I have fixed in a recent update. You can try the code by installing my development branch (pip3 install git+https://github.com/sQu4rks/webexteamssdk@issue-107) or wait until the PR gets merged and a new release gets pushed. I have opened PR-112 for this. |
Released in v1.5 #124. |
Uh oh!
There was an error while loading. Please reload this page.
The cards example doesn't work as written. The imports are invalid.
They did work as this:
from webexteamssdk.models.cards.card import AdaptiveCard
from webexteamssdk.models.cards.inputs import Text, Toggle
from webexteamssdk.models.cards.components import TextBlock
from webexteamssdk.models.cards.actions import Submit
Edited to add: I should mention this is a reference to the readthedocs example of cards. The card object import statements do not work as stated in those docs.
The text was updated successfully, but these errors were encountered: