标签:birt return count default import 文件 inf element 问题
rf+sublime框架测试接口:
python一开始遇到 输出返回值问题,打不出来;
def GetBaseInfo(self, RecordRelatedNumber):
ret=self.comlib.GetBaseInfo( RecordRelatedNumber)
return ret
#直接返回数据ret,问题解决
# if ret==0:
# return 0
# else:
# return self.GetLastError()
直接return,有问题,报错
格式问题; UnicodeEncodeError: ‘ascii‘ codec can‘t encode character u‘\u7537‘ in position 119: ordinal not in range(128)
引入文件后,
import sys
reload(sys)
sys.setdefaultencoding(‘utf-8‘)
问题解决;
<?xml version="1.0" encoding="GBK"?>
<ClinicalBaseDocElement>
<LocationCode>12345678</LocationCode>
<patientSex>男</patientSex>
<HosptializationCount>1</HosptializationCount>
<EncompassingEncounterType>门诊</EncompassingEncounterType>
<patientId>110911199901010000</patientId>
<PatientId>110911199901010000</PatientId>
<PatientNo>201606070011201</PatientNo>
<PerformerId>1</PerformerId>
<patientBirthday>19990101</patientBirthday>
<EncompassingEncounterDate>20160607</EncompassingEncounterDate>
<OutPatientNo>20160607001101</OutPatientNo>
<recordRelatedNumber>999#9999#99999</recordRelatedNumber>
<patientName>张三</patientName>
</ClinicalBaseDocElement>
标签:birt return count default import 文件 inf element 问题
原文地址:https://www.cnblogs.com/wzl629/p/9009744.html