Teams Benachrichtigung Webhook Workflow im Python -Skript, das unter Windows funktioniert, aber nicht LinuxLinux

Linux verstehen
Anonymous
 Teams Benachrichtigung Webhook Workflow im Python -Skript, das unter Windows funktioniert, aber nicht Linux

Post by Anonymous »

Ich habe ein Python -Skript, das einen Webhook auslöst, um eine Teammeldung mit den Skripten Fortschritt zu erstellen. Ich benutze Pymsteams für das Skript. das sieht letztendlich so aus: < /p>
def notify_teams(message):
if debug_dry_run:
return
try:
myTeamsMessage = pymsteams.connectorcard(
"https://prod-09.westeurope.logic.azure. ... webhookurl]")
myTeamsMessage.text(message.replace("_", "-"))
myTeamsMessage.send()
except Exception as e:
print('notify_teams failed: {}'.format(str(e)))
< /code>
Wenn ich das Python -Skript aus meinem Windows -Computer (mit Pycharm) ausführe, funktioniert das Webhook wie erwartet. Wenn ich versuche, es über den Linux -Server auszuführen, mit dem ich das Skript automatisiert habe, schlägt es mit dem folgenden Fehler fehl: < /p>
The execution of template action 'Send_each_adaptive_card' failed: the result of the
evaluation of 'foreach' expression '@triggerOutputs()?['body']?['attachments']'
is of type 'Null'. The result must be a valid array.
< /code>
Die Version für Python auf jeder Maschine lautet:
Linux - Python 3.8.10
Windows - Python 3.9.12
Nicht sicher, ob dies einen Einfluss haben würde oder nicht.>

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post