Ticket #40352

write() argument must be str, not bytes

Open Date: 2020-04-25 03:24 Last Update: 2020-04-25 03:26

Reporter:
Owner:
Type:
Status:
Closed
Component:
Priority:
5 - Medium
Severity:
4
Resolution:
Fixed
File:
None

Details

  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
  • Resolution Update from None to Fixed
  • Status Update from Open to Closed
Comment

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

Edit

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