You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pillow is actively maintained fork of PIL. Pillow >=2.0.0 supports Python 3. Docutils passes a bytes argument to PIL.Image.open(), which expects a str argument.
$ cat test.rst
.. image:: file.png
:scale: 50
$ rst2html.py-3.3 --traceback test.rst
Traceback (most recent call last):
File "/usr/bin/rst2html.py-3.3", line 23, in <module>
publish_cmdline(writer_name='html', description=description)
File "/usr/lib64/python3.3/site-packages/docutils/core.py", line 352, in publish_cmdline
config_section=config_section, enable_exit_status=enable_exit_status)
File "/usr/lib64/python3.3/site-packages/docutils/core.py", line 219, in publish
output = self.writer.write(self.document, self.destination)
File "/usr/lib64/python3.3/site-packages/docutils/writers/__init__.py", line 80, in write
self.translate()
File "/usr/lib64/python3.3/site-packages/docutils/writers/html4css1/__init__.py", line 173, in translate
self.document.walkabout(visitor)
File "/usr/lib64/python3.3/site-packages/docutils/nodes.py", line 174, in walkabout
if child.walkabout(visitor):
File "/usr/lib64/python3.3/site-packages/docutils/nodes.py", line 166, in walkabout
visitor.dispatch_visit(self)
File "/usr/lib64/python3.3/site-packages/docutils/nodes.py", line 1627, in dispatch_visit
return method(node)
File "/usr/lib64/python3.3/site-packages/docutils/writers/html4css1/__init__.py", line 1036, in visit_image
imagepath.encode(sys.getfilesystemencoding()))
File "/usr/lib64/python3.3/site-packages/PIL/Image.py", line 1992, in open
prefix = fp.read(16)
AttributeError: 'bytes' object has no attribute 'read'
commenter: arfrever
posted: 2013-07-03 11:21:30.963000
title: #237 Traceback with Pillow and Python 3
author: arfrever
created: 2013-06-12 17:02:00.114000
assigned: None
SF_url: https://sourceforge.net/p/docutils/bugs/237
Pillow is actively maintained fork of PIL. Pillow >=2.0.0 supports Python 3. Docutils passes a bytes argument to PIL.Image.open(), which expects a str argument.
commenter: arfrever
posted: 2013-07-03 11:21:30.963000
title: #237 Traceback with Pillow and Python 3
I withdraw this suggestion. Pillow 2.1.0 will support bytes filenames:
python-pillow/Pillow#258
commenter: milde
posted: 2013-08-21 22:04:16.420000
title: #237 Traceback with Pillow and Python 3
commenter: milde
posted: 2017-10-25 07:16:45.206000
title: #237 Traceback with Pillow and Python 3
The text was updated successfully, but these errors were encountered: