WebexCommunity / WebexPythonSDK

Work with the Webex APIs in native Python!
https://webexcommunity.github.io/WebexPythonSDK/
MIT License
239 stars 153 forks source link

cards #143

Closed hheisego closed 8 months ago

hheisego commented 4 years ago

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

sQu4rks commented 4 years ago

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?

levensailor commented 3 years ago

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="jlevensailor@presidio.com", cards=card)

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

DJF3 commented 3 years ago

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?

aquaMAX commented 3 years ago

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

cmlccie commented 8 months ago

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.