openyourmind
Chieftain
- Joined
- Feb 22, 2016
- Messages
- 51
Hi there,
Just quick heads up, Favoritecivicdetector isn't set up to use non standard characters.
I've added the following lines and all is swell
For normal users who probably came by error "Error in BeginActivePlayerTurn event handler <bound method FavoriteCivicDetector.onBeginActivePlayerTurn of <FavoriteCivicDetector.FavoriteCivicDetector instance" or "'ascii' codec can't encode character" just do the following.
Just quick heads up, Favoritecivicdetector isn't set up to use non standard characters.
I've added the following lines and all is swell
Code:
# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
For normal users who probably came by error "Error in BeginActivePlayerTurn event handler <bound method FavoriteCivicDetector.onBeginActivePlayerTurn of <FavoriteCivicDetector.FavoriteCivicDetector instance" or "'ascii' codec can't encode character" just do the following.
- Find the FavoriteCivicDetector.py file, usually resides at Mod in question\Assets\Python\Contrib
- In the beginning you will have this
Code:## FavoriteCivicDetector ## ## Keeps track of changing Diplomacy modifiers to guess what an ## AI's favorite civic is. The intended use is for the Foreign Advisor ## to figure out and then display the correct favorite civic of an ## AI leader when playing with the Random Personalities option. ## ## Copyright (c) 2008 The BUG Mod. ## ## Author: Dresden from CvPythonExtensions import * import AttitudeUtil import BugUtil import PlayerUtil import SdToolKit # BUG - Mac Support - start BugUtil.fixSets(globals()) # BUG - Mac Support - end
- Just change it to this:
Code:## FavoriteCivicDetector ## ## Keeps track of changing Diplomacy modifiers to guess what an ## AI's favorite civic is. The intended use is for the Foreign Advisor ## to figure out and then display the correct favorite civic of an ## AI leader when playing with the Random Personalities option. ## ## Copyright (c) 2008 The BUG Mod. ## ## Author: Dresden from CvPythonExtensions import * import AttitudeUtil import BugUtil import PlayerUtil import SdToolKit # encoding=utf8 import sys reload(sys) sys.setdefaultencoding('utf8') # BUG - Mac Support - start BugUtil.fixSets(globals()) # BUG - Mac Support - end