Original gen_rom.py from the latest release didn't work for me either.
I had to rewrite it a little bit to make it work on Windows. I actually uploaded it here couple of pages ago.
With that script I was able to successfully inject my old save into Zelda: ALTTP, which has EEPROM save type.
You can try that script if you want, but I'm not sure if it would work for you. Here it is: https://gbatemp.net/attachments/gen_rom-zip.38211/
Oh man, saved my butt there, thanks! For some reason I missed your post despite reading through the entire thread a few times.
I actually tried to fix the script the same way you did but I'd never worked with python before so I had no idea what I was doing. Glad to see I was on the right path.