Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I suddenly getting a no attribute 'CLSIDToPackageMap' error with win32com.client?

The code

import win32com.client as win32 
Excel = win32.gencache.EnsureDispatch('Excel.Application') 

used to work, but now it produces the error:

AttributeError: 'module' object has no attribute 'CLSIDToPackageMap'

what's going on?

like image 535
theVerse Avatar asked Oct 21 '15 18:10

theVerse


People also ask

What is win32com client in Python?

There are several APIs available to convert text to speech in python. One of such APIs available in the python library commonly known as win32com library. It provides a bunch of methods to get excited about and one of them is the Dispatch method of the library.

What is the use of win32com client?

The win32com. client package contains a number of modules to provide access to automation objects. This package supports both late and early bindings, as we will discuss.


1 Answers

After deleting C:\Temp\gen_py, the code above works again. Hope it can save trouble!

like image 123
theVerse Avatar answered Sep 19 '22 11:09

theVerse