UnicodeEncodeError: 'ascii' codec can't encode character u'\xef' in position 0: ordinal not in range(128)

前端 未结 7 1549
旧巷少年郎
旧巷少年郎 2020-11-28 04:24

I want to parse my XML document. So I have stored my XML document as below

class XMLdocs(db.Expando):  
   id = db.IntegerProperty()    
   name=db.StringPro         


        
相关标签:
7条回答
  • 2020-11-28 04:58

    An easy solution to overcome this problem is to set your default encoding to utf8. Follow is an example

    import sys
    
    reload(sys)
    sys.setdefaultencoding('utf8')
    
    0 讨论(0)
提交回复
热议问题