I tried to run COGtools on my data and on my first try COGtools just printed 0 into command line and created an empty em_my_organism.gff file. So I dived into your code and I was able to locate the problem. The bug is in em_processor() function in program_processor module and particularly on line 87, where you write to the new file:
f.write('# created with COGtools 1.0.0\n# AC number: ' + em_data["seqname"][0] + "\n# Processed data from eggNOG-mapper\n")
The reason, why the tool failed in my case, was because of missing zeroth row in the dataframe. In my case the first CDS didn't have any COG categories assigned, so this row of the dataframe was dropped during processing with others with missing COG annotations (see picture below). And on line 87 your code uses some information from the zeroth row and that's the reason why this bug occurred.

I recommend to reset the index of the final processed dataframe to fix this bug. You can do that by DataFrame.reset_index method (see also this post). I recommend to also check other functions that drop rows in dataframes and later your code accesses a particular row in those dataframes.
I tried to run COGtools on my data and on my first try COGtools just printed
0into command line and created an emptyem_my_organism.gfffile. So I dived into your code and I was able to locate the problem. The bug is inem_processor()function inprogram_processormodule and particularly on line 87, where you write to the new file:The reason, why the tool failed in my case, was because of missing zeroth row in the dataframe. In my case the first CDS didn't have any COG categories assigned, so this row of the dataframe was dropped during processing with others with missing COG annotations (see picture below). And on line 87 your code uses some information from the zeroth row and that's the reason why this bug occurred.
I recommend to reset the index of the final processed dataframe to fix this bug. You can do that by DataFrame.reset_index method (see also this post). I recommend to also check other functions that drop rows in dataframes and later your code accesses a particular row in those dataframes.