It was easy the erroe message says
Steph_CivIII_ExpandedEditor.Functions.PCX.ReadPalette(BinaryReader reader, ColorPalette& palette)
...
Steph_CivIII_ExpandedEditor.Forms.FormPedia.SetActive(Unit_PRTO unit)
I.e. when setting the Unit_PRTO for the pedia form, the palette cannot be read.
If you look at a dictionnary for "weird programming", the official definition is "what CA did for Civ 3
Some parts of the save and biq format are bordering the ridiculous