Closed
Description
I suddenly get an ValueError each time I enter a letter in a newline; even if I first enter spaces and then a letter or other symbols or digits which is possible but if I delete them and then enter a letter it crashes.
I didn't update neither my bpython nor my anaconda/python2.7 installation; only the regular Ubuntu 16.04 updates.
bpython version 0.16 on top of Python 2.7.13 /home/jd/work/miniconda3/envs/py2/bin/python
>>> help(
...
Traceback (most recent call last):
File "/home/jd/work/miniconda3/envs/py2/bin/bpython", line 11, in <module>
sys.exit(main())
File "/home/jd/work/miniconda3/envs/py2/lib/python2.7/site-packages/bpython/curtsies.py", line 190, in main
exit_value = repl.mainloop()
File "/home/jd/work/miniconda3/envs/py2/lib/python2.7/site-packages/bpython/curtsies.py", line 125, in mainloop
self.process_event_and_paint(e)
File "/home/jd/work/miniconda3/envs/py2/lib/python2.7/site-packages/bpython/curtsies.py", line 99, in process_event_and_paint
array, cursor_pos = self.paint()
File "/home/jd/work/miniconda3/envs/py2/lib/python2.7/site-packages/bpython/curtsiesfrontend/repl.py", line 1447, in paint
if self.matches_iter.completer else None)
File "/home/jd/work/miniconda3/envs/py2/lib/python2.7/site-packages/bpython/curtsiesfrontend/replpainter.py", line 182, in paint_infobox
if matches else [])
File "/home/jd/work/miniconda3/envs/py2/lib/python2.7/site-packages/bpython/curtsiesfrontend/replpainter.py", line 78, in matches_lines
for i in range(0, len(matches), words_wide)]
File "/home/jd/work/miniconda3/envs/py2/lib/python2.7/site-packages/curtsies/formatstring.py", line 264, in join
for i, s in enumerate(iterable):
File "/home/jd/work/miniconda3/envs/py2/lib/python2.7/site-packages/bpython/curtsiesfrontend/replpainter.py", line 77, in <genexpr>
for m in matches[i:i+words_wide])
File "/home/jd/work/miniconda3/envs/py2/lib/python2.7/site-packages/curtsies/formatstring.py", line 628, in fmtstr
string = FmtStr.from_str(string)
File "/home/jd/work/miniconda3/envs/py2/lib/python2.7/site-packages/curtsies/formatstring.py", line 180, in from_str
return FmtStr(Chunk(s))
File "/home/jd/work/miniconda3/envs/py2/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 'set '
The ValueError depends on the letter entered:
For example a 'a' results in:
ValueError: unicode string required, got 'abs '
whereas a 'q' results in:
ValueError: unicode string required, got 'quit'