Closed DaYongUpUp closed 3 months ago
Hey Thank you for reporting this issue. This seems to be a weio issue. You can try downloading the latest dev version of weio to see if that fixes it.
As a warning, this wtDigitTwin
repository is slightly on-hold, I'll update it in about 6 months.
Sorry if things are broken..
Hi, When I run one of the examples, there are some EncodeError, I debuged for some time, it seems that toString() in fast_input_file.py throw some error, the information print in terminal is like below, thank you for your time and looking forward to your reply
../../_data/NREL5MW_Linearizations/ws_4.fst ../../_data/NREL5MW_Linearizations/NREL5MW_IW_ws_4.dat ../../_data/NREL5MW_Linearizations/NREL5MW_ED_ws_4.dat ../../_data/NREL5MW_Linearizations/NREL5MW_AD15.05_ws_4.dat Traceback (most recent call last): File "/home/li/Documents/wtDitiTwin/wtDigiTwin/examples/onshore_OFLin/001_Linearization_GenerateCase.py", line 87, in
fastfiles=fastlib.templateReplace(PARAMS,ref_dir,outputDir=work_dir,removeRefSubFiles=True,main_file=main_file)
File "/home/li/Documents/wtDitiTwin/wtDigiTwin/wtDigiTwin/fast/fastlib.py", line 1229, in templateReplace
return templateReplaceGeneral(PARAMS, templateDir, outputDir=outputDir, main_file=main_file,
File "/home/li/Documents/wtDitiTwin/wtDigiTwin/wtDigiTwin/fast/fastlib.py", line 1202, in templateReplaceGeneral
f.write()
File "/home/li/Documents/wtDitiTwin/weio/weio/fast_input_file.py", line 103, in write
return self.fixedfile.write(filename)
File "/home/li/Documents/wtDitiTwin/weio/weio/fast_input_file.py", line 740, in write
self._write()
File "/home/li/Documents/wtDitiTwin/weio/weio/fast_input_file.py", line 752, in _write
f.write(self.toString())
UnicodeEncodeError: 'utf-8' codec can't encode character '\udc96' in position 863: surrogates not allowed