Closed
Description
@Julian found unicode errors on master: https://bpaste.net/show/df5269cf4f95
It seems that passing a bytestring to paint_statusbar
ends poorly, but not sure how this is occurring. It seems to have happened at startup in the above example.
(bpython)tom-mba:bpython tomb$ bpython
bpython version 0.15.dev85 on top of Python 2.7.9 /Users/tomb/.virtualenvs/bpython/bin/python2.7
>>> from bpython.curtsiesfrontend import replpainter
>>> from bpython.curtsies import repl
>>> import curtsies
>>> curtsies.__version__
'0.2.3'
>>> replpainter.paint_statusbar(1, 100, b'adsfasdf', repl.config)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Users/tomb/Dropbox/code/bpython/bpython/curtsiesfrontend/replpainter.py", line 215, in paint_statusbar
return fsarray([func(msg.ljust(columns))[:columns]])
File "/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/curtsies/formatstring.py", line 615, in fmtstr
string = FmtStr.from_str(string)
File "/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/curtsies/formatstring.py", line 169, in from_str
return FmtStr(Chunk(s))
File "/Users/tomb/.virtualenvs/bpython/lib/python2.7/site-packages/curtsies/formatstring.py", line 70, in __init__
raise ValueError("unicode string required, got %r" % string)
ValueError: unicode string required, got 'adsfasdf '
>>>