0

First i would like to say I found a few posts here regarding my issue however nothing helped so hopefully I still can find a solution

Lately I have being working on a small project . Near my office there is a soccer field and each time a game is planned we have a lot of traffic issues . I decided to build a simple app that will notify to people on a game at the same day it is scheduled to take place . For this I'm using Toastwin10notifier package among some other packages . The problem is as the title . I get this error when I try to run it . I updated the pywin32 package and also pypiwin32 package.

I'm using the latest Spyder release and Python 3.9

 #Importing relevant packages 
#requests for getting information from the website
#bs4 for handling the scrapping nicely 
 
import requests 
from bs4 import BeautifulSoup
from win10toast import ToastNotifier 




#The relevant website address
web_url = requests.get ('http://mhaifafc.com/games.asp?lang=en').text
soup = BeautifulSoup(web_url , 'html.parser')

#Getting the specific class from the url 
class_name_table = soup.find('div', class_ = 'spacing-top').text

#Printing the class content 
print(class_name_table)



#Run every X time 
class shownotification:
   pass
notification = ToastNotifier()
notification.show_toast(title = "FGMT notification" , 
                Message = "A game is schduled for today",
icon_path = "C:\Tools\DTETool\icon.ico", duation = 10)

The error :

from win10toast import ToastNotifier

File "C:\Users\ilq01041\Anaconda3.2021.5\Lib\site-packages\win10toast\__init__.py", line 21, in <module>
from win32con import CW_USEDEFAULT

ModuleNotFoundError: No module named 'win32con'

I'll be happy for some help here .

NoamAS
  • 31
  • 5
  • Seems like there is dependency between modules which is missing from the package's list of dependencies. What happens when you install `win32con` in the same place as the other modules in the package? – John Coleman Aug 14 '21 at 10:57
  • I can't really install win32con . pip doesn't recognize such package – NoamAS Aug 15 '21 at 08:18

1 Answers1

2

Found the solution in my case . I had to install pywin32 using install -c anaconda pywin32 . I'm not sure why I had to use that option specifically but I found it during my searches . Solution is below :

https://github.com/xlwings/xlwings/issues/1174

NoamAS
  • 31
  • 5