The most common reason for this is a player was placed on a scenario map without a Palace. The game does not automatically add a Palace to scenario-made players, and without it, they have no capital.
The bug is in the vanilla GetCapitalCity function, so I'll replace it with a fixed mod version. (I only recently learned it's possible to replace these.)
i'm sorry i'm having the worst luck with these, even with v146 installed. it seems the palace problem is still happening, even on my test map (where only start locations are designated and no pre-placed cities). see attached (both scenario and lua)