I have some code wherein I am importing the python file using importlib.import_module() but I am getting some strange attribute error which was not there couple of days back when I ran the same python script (without any change). Here is the error: AttributeError: module 'win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9' has no attribute 'MinorVersion'
Also, the full traceback:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\hp\Anaconda3\lib\tkinter\__init__.py", line 1705, in __call__
File "C:/Fourth Term @ Dal/Project/Collaboration/Sensitivity analysis/GUI/template5.py", line 88, in go_to_template6
importlib.import_module(Model_Variant)
File "C:\Users\hp\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Fourth Term @ Dal\Project\Collaboration\Sensitivity analysis\GUI\Day1Yes Base Model.py", line 219, in <module>
excel = win32.gencache.EnsureDispatch('Excel.Application')
File "C:\Users\hp\Anaconda3\lib\site-packages\win32com\client\gencache.py", line 534, in EnsureDispatch
File "C:\Users\hp\Anaconda3\lib\site-packages\win32com\client\gencache.py", line 447, in EnsureModule
AttributeError: module 'win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9' has no attribute 'MinorVersion'