WebexPythonSDK icon indicating copy to clipboard operation
WebexPythonSDK copied to clipboard

cards

Open hheisego opened this issue 5 years ago • 4 comments

Good day Team,

python 3.7 is stills supported? getting couple errors while importing:

from webexteamssdk.cards.card import AdaptiveCard from webexteamssdk.cards.inputs import Text, Number from webexteamssdk.cards.components import TextBlock from webexteamssdk.cards.actions import Submit

hheisego avatar Oct 27 '20 18:10 hheisego

Hi @hheisego

thanks for raising this issue.

Could you elaborate on the errors you are seeing? Also could you provide the version of the webexteamssdk you are using?

sQu4rks avatar Oct 27 '20 18:10 sQu4rks

having the same issue with latest version of webexteamssdk


from webexteamssdk import WebexTeamsAPI
from webexteamssdk.cards.card import AdaptiveCard
from webexteamssdk.cards.inputs import Text, Number
from webexteamssdk.cards.components import TextBlock
from webexteamssdk.cards.actions import Submit

api = WebexTeamsAPI(access_token='nope')
greeting = TextBlock("Hey hello there! I am a adaptive card")
first_name = Text('first_name', placeholder="First Name")
age = Number('age', placeholder="Age")
submit = Submit(title="Send me!")
card = AdaptiveCard(
    body=[greeting, first_name, age], 
    actions=[submit])

api.messages.create(text="fallback", personEmail="[email protected]", cards=card)

File "app.py", line 2, in from webexteamssdk.cards.card import AdaptiveCard ModuleNotFoundError: No module named 'webexteamssdk.cards'

levensailor avatar Dec 22 '20 19:12 levensailor

I have the exact same issue. This example came straight from the documentation but I have not found a way to get it to work. (python 3.7 and 3.9.1) Any updates on this Card issue?

DJF3 avatar Mar 10 '21 14:03 DJF3

duplicate issue but i need to fix it manual when using pip install https://github.com/CiscoDevNet/webexteamssdk/issues/155

aquaMAX avatar Jul 13 '21 05:07 aquaMAX

This was/is a documentation bug that was fixed in the code 16 months ago (https://github.com/WebexCommunity/WebexPythonSDK/commit/b0e552cf0159940ae07e459819281758b628962c). I will make sure the docs get updated when we release v1.7.

cmlccie avatar Mar 31 '24 04:03 cmlccie