I was trying to send a notification with an image after a bit of googling I found this code in stack overflow
even though the code below gives a notification with space for the image, the image doesn't load
What I have tried
I tried adding time.sleep() between few lines to give it some time to load the image
tried changing the interpreter to python 3.9
tried changing image source to another image
executing the code from another computer
none of these worked
import winrt.windows.ui.notifications as notifications
import winrt.windows.data.xml.dom as dom
import time
app = r'C:\Users\Sandramohan\AppData\Local\Programs\Python\Python38\python.exe'
nManager = notifications.ToastNotificationManager
notifier = nManager.create_toast_notifier(app)
tString = """
<toast>
<visual>
<binding template='ToastGeneric'>
<text>Another Message from Tim!</text>
<text>Hi there!</text>
<image placement="appLogoOverride" HintCrop="circle" src="https://www.decotaime.fr/decoration/images/178/Tableau-design-plexi-Pixel-Art-Marylin-Blue-50x50_L26640.jpg"/>
</binding>
</visual>
</toast>
"""
xDoc = dom.XmlDocument()
time.sleep(5)
xDoc.load_xml(tString)
notification = notifications.ToastNotification(xDoc)
#display notification
notifier.show(notification)