[Solved] office Auto Error: ‘win32com.gen_py….’ has no attribute ‘CLSIDToClassMap’

D4e67c7b7089 error code:

Import Win32 com.client as Win32
word = win32.gencache.ensuredispatch (‘word. Application ‘) ## error location
error prompt:

AttributeError: module ‘win32com.gen_Py. 00020905-0000-0000-c000-000000000046x0x8x5 ‘has no attribute’ clsidtoclassmap ‘
solution: delete the cache folder in the directory  C:\users\Erica\appdata\local\temp\Gen_00020905-0000-0000-c000- 000000000046x0x8x5 in py\3.7 can be used. Re execute the above code and no error will be reported.

Tip: use everything to search Gen_Py, confirm the folder Gen_Py location.

Similar Posts: