LoginSignup
0
0

More than 5 years have passed since last update.

Python2.7+PyQt4でUnicodeEncodeErrorが出た時用の メモ

Posted at

コード

    print (self.dia.lineEdit.displayText())

エラーメッセージ

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128)

対処策

    print (unicode(self.dia.lineEdit.displayText()))
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0