jithurjacob / Windows-10-Toast-Notifications

Python library to display Windows 10 Toast Notifications
MIT License
970 stars 168 forks source link

Am getting an exception as bellow when I use Pool and create the notification #55

Open pinkeparu opened 5 years ago

pinkeparu commented 5 years ago

Python WNDPROC handler failed Traceback (most recent call last): File "C:\Users\vanjaneya\AppData\Local\Programs\Python\Python37-32\lib\site-packages\win10toast__init__.py", line 153, in on_destroy Shell_NotifyIcon(NIM_DELETE, nid) pywintypes.error: (-2147467259, 'Shell_NotifyIcon', 'Unspecified error')

My code is similar this

import sys import json import time from functools import partial from win10toast import ToastNotifier from multiprocessing import Pool

def callNot(index): try:
print("index",index) toaster = ToastNotifier() toaster.show_toast(index + " creation SUCCEEDED", "File containing informations is available.")
except: print('error') if name == 'main':
pool = Pool(int(50))
func = partial(callNot) result = pool.map(func,str(1234567891011133333333333333333333333311111111111))
pool.close() pool.join()