vilcans/screenplain — Issue #1: AttributeError: 'RichString' object has no attribute 'expandtabs'
Author: samtygier
Created: 2011-10-09 12:22:58+00:00
State: open

I have downloaded screenplain on ubuntu linux. it passes the 3 tests with no errors on python2.7 and python2.5 installed from the deadsnakes ppa.

however when I run with either python version:
python2.5 screenplain/main.py test.spmd test.pdf
i get
Traceback (most recent call last):
File "screenplain/main.py", line 68, in
main(sys.argv[1:])
File "screenplain/main.py", line 51, in main
to_pdf(screenplay, output_file)
File "/home/sam/play/screenplain/screenplain/screenplain/export/pdf.py", line 15, in to_pdf
for page_no, page in enumerate(get_pages(screenplay)):
File "/home/sam/play/screenplain/screenplain/screenplain/format.py", line 11, in get_pages
para_lines = list(paragraph.format())
File "/home/sam/play/screenplain/screenplain/screenplain/types.py", line 89, in format
for line in textwrap.wrap(logical_line, width=self.fill):
File "/usr/lib/python2.5/textwrap.py", line 303, in wrap
return w.wrap(text)
File "/usr/lib/python2.5/textwrap.py", line 274, in wrap
text = self._munge_whitespace(text)
File "/usr/lib/python2.5/textwrap.py", line 122, in _munge_whitespace
text = text.expandtabs()
AttributeError: 'RichString' object has no attribute 'expandtabs'

looks like RichString does not implement expandtabs() with is expected by the standard library textwrap.

I aslo saw the same issue on MacOS X.