Issue on Python 3.6
See original GitHub issueCode works perfectly on Python 2.7, but in Python 3.6 crashes the first time Screen.refresh() is called.
Traceback (most recent call last):
File "/Users/anthonyshaw/repo/retox-2/retox/__main__.py", line 66, in main
screen.refresh()
File "/Users/anthonyshaw/repo/retox-2/src/asciimatics/asciimatics/screen.py", line 2129, in refresh
super(_CursesScreen, self).refresh()
File "/Users/anthonyshaw/repo/retox-2/src/asciimatics/asciimatics/screen.py", line 1216, in refresh
self._change_colours(new_cell[1], new_cell[2], new_cell[3])
File "/Users/anthonyshaw/repo/retox-2/src/asciimatics/asciimatics/screen.py", line 2225, in _change_colours
self._safe_write(self._a_normal)
File "/Users/anthonyshaw/repo/retox-2/src/asciimatics/asciimatics/screen.py", line 2085, in _safe_write
sys.stdout.write(msg)
File "/Users/anthonyshaw/repo/retox-2/bin/../lib/python3.6/codecs.py", line 377, in write
self.stream.write(data)
File "/Users/anthonyshaw/repo/retox-2/bin/../lib/python3.6/codecs.py", line 376, in write
data, consumed = self.encode(object, self.errors)
TypeError: utf_8_encode() argument 1 must be str, not bytes
Any help/tips on debugging would be appreciated.
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (11 by maintainers)
Top Results From Across the Web
It's time to stop using Python 3.6
Python 3.6 will stop getting security updates in December 2021. Given the existence of 3.7, 3.8, 3.9, and 3.10, you really should upgrade....
Read more >Python Release Python 3.6.0
Python 3.6.0. Release Date: Dec. 23, 2016. Note: The release you are looking at is Python 3.6.0, the initial feature release for the...
Read more >How to resolve this import error in Python 3.6? - Stack Overflow
I have the same problem. This kind of import problem happens only on python 3.6.x . Same code working on 3.7, fails in...
Read more >Tensorflow problem in Python 3.6 · Issue #43000 - GitHub
Hi, I have installed these packages, pip list, but python 3.6 tells me it takes tensorflow 2.2 or higher, but here it is...
Read more >Problem Solving with Python 3.6 Edition: A beginner's guide to ...
Problem Solving with Python 3.6 Edition: A beginner's guide to Python & open-source programming tools [Kazarinoff, Peter D.] on Amazon.com.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah - it’s doing its best to scuttle away and hide!
Note that the problem is that tox is setting up UTF-8 StreamWriter around a UTF-8 TextIOWrapper. Getting access to the underlying BufferedWriter instead would fix the issue. For example: