I'm experiencing a weird bug in a file conversion script I wrote in python. I'm using the comtypes library to convert different types of files into pdfs and for some reason, I get module 'comtypes.gen.Excel' has no attribute '_Application'
whenever I try to create a client object for an excel application. I can't seem to find anything online specific to this issue. The script was working fine about a month or two ago, so I'm confused as to why it isn't working anymore - the only thing I could think of was excel updating or something (if that would even matter). I have the office 2016 if that's relevant. If anyone has experienced this bug or has any ideas, help would be greatly appreciated. Here's the script, for reference:
import comtypes.client
excel = comtypes.client.CreateObject("Excel.Application") # exception here
excel.Visible = False
in_file = "INPUT_FILE"
out_file = "OUT_FILE"
f = excel.Workbooks.Open(in_file)
f.ExportAsFixedFormat(0, out_file, 1, 0)
f.Close()
excel.Close()