1

Hi I am writing Desktop notifier code in python but I am getting an error.

I have already installed the win10toast module.

import time

from win10toast import ToastNotifier

remTime=input("enter the time")

remMsg=input("enter youor msg")

while True:

    current_Time=time.strftime("%H:%M:%S")

    if current_Time==rem_Time:

        print(current_Time)

        break

notify=ToastNotifier()

notify.show_toast("Notification",remMsg)

getting error

Traceback (most recent call last):

File "D:\PythonProjects\DesktopNotifier.py", line 3, in from win10toast import ToastNotifier File "C:\Users\Ayushi Tripathi\AppData\Local\Programs\python\Python38-32\lib\site-packages\win10toast_init_.py", line 19, in from win32api import GetModuleHandle ModuleNotFoundError: No module named 'win32api'

I tried to install win32api then getting another error

ERROR: Could not find a version that satisfies the requirement win32api (from versions: none) ERROR: No matching distribution found for win32api

2
  • pywin32 depends on you operation system and the python version that you are using. Normally 32bit version should works on both 32 and 64 bit OS. You can refer this. By the way, line 13, use remTime instead of rem_Time. Commented Sep 15, 2020 at 3:13
  • i already have pywin32 Commented Sep 15, 2020 at 13:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.