waylan/Python-Markdown — Issue #61: Traceback when using cmdline tool with Python 3.2
Author: thmo
Created: 2011-12-17 11:21:32+00:00
State: open

Build and installed markdown 2.1.0 using Python 3.2.1, on Fedora 16 (markdown_py has been renamed to /usr/bin/markdown_py-3.2).

Now:

% /bin/echo -e "### Heading\n\ntest" | markdown_py-3.2
Traceback (most recent call last):
File "/usr/bin/markdown_py-3.2", line 34, in
run()
File "/usr/lib/python3.2/site-packages/markdown/__main__.py", line 81, in run
markdown.markdownFromFile(**options)
File "/usr/lib/python3.2/site-packages/markdown/__init__.py", line 416, in markdownFromFile
kwargs.get('encoding', None))
File "/usr/lib/python3.2/site-packages/markdown/__init__.py", line 341, in convertFile
text = input_file.read()
File "/usr/lib64/python3.2/codecs.py", line 480, in read
data = self.bytebuffer + newdata
TypeError: can't concat bytes to str

Specifying -e UTF-8 does not help.