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

Strive Sun
  • 5,988
  • 1
  • 9
  • 26
  • `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](https://stackoverflow.com/a/26485933/11128312). By the way, line 13, use `remTime` instead of `rem_Time`. – Strive Sun Sep 15 '20 at 03:13
  • i already have pywin32 – ayushi tripathi Sep 15 '20 at 13:35

0 Answers0