Python Error Mystery.

The Capo

godless Heathen
Joined
Jan 29, 2001
Messages
9,302
Location
Washington, DC
I am working on a mod and am in the process of playtesting/debugging it. And I noticed that, for some reason whenever Spain is selected I get this python error:


file "CvAppInterface", line 70, in preGameStart
file "CvScreensInterface", line 75, in showTechChooser
file "CvTechChooser", line 124, in interfaceScreen
file "CvTechChooser", line 205, in placeTechs

RuntimeError: unidentifiable C++ exception


I don't have any of these files in my actual mod, they are just present in the vanilla BtS. So I think its either an XML issue or something. In my mod I have added Israel and the Iroquois as civs, I have also changed the name of the Native Americans to the Sioux. I have also added a bunch of leaders, and particularly two to Spain (Franco and Philip II). So there's a little background on the changes I have made. I checked all of the XML and it looks good but here is what the python files say in the regular BtS:

This is line 67 through 71 in CvAppInterface:
Code:
		# Preload the tech chooser..., only do this release builds, in debug build we may not be raising the tech chooser
		if (not gc.isDebugBuild()):
			NiTextOut("Preloading tech chooser")
			CvScreensInterface.showTechChooser()
			CvScreensInterface.techChooser.hideScreen()

This is lines 72 through 75 in CvScreensInterface:
Code:
techChooser = CvTechChooser.CvTechChooser()
def showTechChooser():
	if (-1 != CyGame().getActivePlayer()):
		techChooser.interfaceScreen()

This is lines 123 and 124 in CvTechChooser:
Code:
		# Place the tech blocks
		self.placeTechs()

And finally lines 199 through 206:
Code:
			# Unlockable units...
			for j in range( gc.getNumUnitClassInfos() ):
				eLoopUnit = gc.getCivilizationInfo(gc.getGame().getActiveCivilizationType()).getCivilizationUnits(j)
				if (eLoopUnit != -1):
					if (gc.getUnitInfo(eLoopUnit).getPrereqAndTech() == i):
						szUnitButton = "Unit" + str(j)
						screen.addDDSGFCAt( szUnitButton, szTechRecord, gc.getPlayer(gc.getGame().getActivePlayer()).getUnitButton(eLoopUnit), iX + fX, iY + Y_ROW, TEXTURE_SIZE, TEXTURE_SIZE, WidgetTypes.WIDGET_PEDIA_JUMP_TO_UNIT, eLoopUnit, 1, True )
						fX += X_INCREMENT

Now I realize that since these are the regular BtS files I shouldn't change any of them. But what I am asking is why this is happening? And why only Spain? It isn't even a particular leader, the error occurs whether it is Isabella, Franco or Philip. Further I tested it with everyone else and the error doesn't come up. Its only Spain.

Hopefully someone knows why this may be happening. Thank you in advance.
 
You need to look at the UnitArtTypeStlyles.xml file in the Civilizations folder. There is an art define listed for Spain that does not exist in the Civ4ArtDefines_Unit.xml file. I had this same error for the longest time and finally figured this out...

Cheers,
ripple01
 
Top Bottom