待辦事項 #40352

write() argument must be str, not bytes

啟用日期: 2020-04-25 03:24 最後更新: 2020-04-25 03:26

回報者:
負責人:
類型:
狀態:
關閉
元件:
優先權:
5 - 中
嚴重程度:
4
處理結果:
修正
檔案:

細節

  1. Exception in Tkinter callback
  2. Traceback (most recent call last):
  3. File "/home/sforman/anaconda2/envs/mne/lib/python3.6/tkinter/__init__.py", line 1705, in __call__
  4. return self.func(*args)
  5. File "/home/sforman/anaconda2/envs/mne/lib/python3.6/tkinter/__init__.py", line 749, in callit
  6. func(*args)
  7. File "/home/sforman/Desktop/ArchLayer/System/source/Thun/joy/gui/textwidget.py", line 121, in _saveFunc
  8. self.saver(self._get_contents())
  9. File "/home/sforman/Desktop/ArchLayer/System/source/Thun/joy/gui/textwidget.py", line 128, in _saver
  10. f.write(text.encode('UTF_8'))
  11. TypeError: write() argument must be str, not bytes

Ticket History (2/2 Histories)

2020-04-25 03:24 Updated by: sforman
  • New Ticket "write() argument must be str, not bytes" created
2020-04-25 03:26 Updated by: sforman
  • 處理結果 Update from to 修正
  • 狀態 Update from 開啟 to 關閉
評語

Fixed in 786fdcbbf97114db5e394d03e5b96c94c0b7e7a8

https://osdn.net/projects/joypy/scm/hg/Joypy/commits/786fdcbbf97114db5e394d03e5b96c94c0b7e7a8

Just have to open the file in binary mode.

Attachment File List

No attachments

編輯

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登入