Recently, I tried using the python Excel functions on Windows with the win32com.client library. I installed it with :
pip install pywin32
I used it on my script, with simple commands like :
import os
import win32com.client as win32
ExcelApp = win32.gencache.EnsureDispatch("Excel.Application")
ExcelWrkBook = ExcelApp.ActiveWorkbook
ExcelWrkSht = ExcelWrkBook.ActiveSheet
ExcelWrkSht.Cells(5,3).Value = "something"
So it all worked just fine , till I got an Error like this out of nowhere :
Traceback (most recent call last): File "myscript.py", line 2, in import win32com.client as win32 File "C:\Users\Mycomputer\AppData\Local\Programs\Python\Python37-32\lib\site-packages\wi n32com\client__init__.py", line 11, in from . import gencache File "C:\Users\Mycomputer\AppData\Local\Programs\Python\Python37-32\lib\site-packages\wi n32com\client\gencache.py", line 660, in init() File "C:\Users\Mycomputer\AppData\Local\Programs\Python\Python37-32\lib\site-packages\wi n32com\client\gencache.py", line 60, in init _LoadDicts() File "C:\Users\Mycomputer\AppData\Local\Programs\Python\Python37-32\lib\site-packages\wi n32com\client\gencache.py", line 113, in _LoadDicts version = p.load() EOFError: Ran out of input
this pops up whenever I import win32com.client as win32, I tried reinstalling the library but it is still the same , Any idea ?