From: Dave K. <dku...@us...> - 2017-07-03 22:46:10
|
Fixed. Dave K On Wed, Jun 28, 2017 at 10:34:38PM +0000, "Günter Milde" via Docutils-develop wrote: > - **labels**: --> ODT Writer > > > > --- > > ** [bugs:#282] rst2odt fails on python3: AttributeError: 'str' object has no attribute 'decode'** > > **Status:** open > **Group:** Default > **Labels:** ODT Writer > **Created:** Tue Aug 11, 2015 11:18 AM UTC by Matthijs Kooijman > **Last Updated:** Tue Aug 11, 2015 11:19 AM UTC > **Owner:** nobody > > > This exception occurs because apparently `ConfigParser` already decodes the strings it returns somehow. Tested on a Debian Jessie system, using 3.4.2. To reproduce: > > $ touch test.rst > $ echo -e '[Formats]\nfoo=bar' > test.ini > $ python3 /usr/share/docutils/scripts/python3/rst2odt --traceback --odf-config-file=test.ini test.rst test.odt > test.rst:: (WARNING/2) Style "foo" is not a style used by odtwriter. > Traceback (most recent call last): > File "/usr/share/docutils/scripts/python3/rst2odt", line 29, in <module> > description=description) > File "/usr/lib/python3/dist-packages/docutils/core.py", line 551, in publish_cmdline_to_binary > config_section=config_section, enable_exit_status=enable_exit_status) > File "/usr/lib/python3/dist-packages/docutils/core.py", line 219, in publish > output = self.writer.write(self.document, self.destination) > File "/usr/lib/python3/dist-packages/docutils/writers/__init__.py", line 80, in write > self.translate() > File "/usr/lib/python3/dist-packages/docutils/writers/odf_odt/__init__.py", line 550, in translate > self.visitor = self.translator_class(self.document) > File "/usr/lib/python3/dist-packages/docutils/writers/odf_odt/__init__.py", line 807, in __init__ > self.format_map[rststyle] = format.decode('utf-8') > AttributeError: 'str' object has no attribute 'decode' > > > > --- > > Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ > > To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Docutils-develop mailing list > Doc...@li... > https://lists.sourceforge.net/lists/listinfo/docutils-develop > > Please use "Reply All" to reply to the list. -- Dave Kuhlman http://www.davekuhlman.org --- ** [bugs:#282] rst2odt fails on python3: AttributeError: 'str' object has no attribute 'decode'** **Status:** open **Group:** Default **Labels:** ODT Writer **Created:** Tue Aug 11, 2015 11:18 AM UTC by Matthijs Kooijman **Last Updated:** Wed Jun 28, 2017 10:34 PM UTC **Owner:** nobody This exception occurs because apparently `ConfigParser` already decodes the strings it returns somehow. Tested on a Debian Jessie system, using 3.4.2. To reproduce: $ touch test.rst $ echo -e '[Formats]\nfoo=bar' > test.ini $ python3 /usr/share/docutils/scripts/python3/rst2odt --traceback --odf-config-file=test.ini test.rst test.odt test.rst:: (WARNING/2) Style "foo" is not a style used by odtwriter. Traceback (most recent call last): File "/usr/share/docutils/scripts/python3/rst2odt", line 29, in <module> description=description) File "/usr/lib/python3/dist-packages/docutils/core.py", line 551, in publish_cmdline_to_binary config_section=config_section, enable_exit_status=enable_exit_status) File "/usr/lib/python3/dist-packages/docutils/core.py", line 219, in publish output = self.writer.write(self.document, self.destination) File "/usr/lib/python3/dist-packages/docutils/writers/__init__.py", line 80, in write self.translate() File "/usr/lib/python3/dist-packages/docutils/writers/odf_odt/__init__.py", line 550, in translate self.visitor = self.translator_class(self.document) File "/usr/lib/python3/dist-packages/docutils/writers/odf_odt/__init__.py", line 807, in __init__ self.format_map[rststyle] = format.decode('utf-8') AttributeError: 'str' object has no attribute 'decode' --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |