Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'bytes' object has no attribute 'encode' #36

Closed
Fale opened this issue Sep 8, 2016 · 0 comments
Closed

AttributeError: 'bytes' object has no attribute 'encode' #36

Fale opened this issue Sep 8, 2016 · 0 comments

Comments

@Fale
Copy link

Fale commented Sep 8, 2016

rst2odp --template-file=2014.otp --traceback intro.rst intro.odp

Output:

Traceback (most recent call last):
  File "/usr/bin/rst2odp", line 1308, in <module>
    sys.exit(main(sys.argv) or 0)
  File "/usr/bin/rst2odp", line 1297, in main
    enable_exit_status=enable_exit_status)
  File "/usr/lib/python3.5/site-packages/docutils/core.py", line 219, in publish
    output = self.writer.write(self.document, self.destination)
  File "/usr/lib/python3.5/site-packages/docutils/writers/__init__.py", line 80, in write
    self.translate()
  File "/usr/bin/rst2odp", line 210, in translate
    self.visitor = self.translator_class(self.document)
  File "/usr/bin/rst2odp", line 225, in __init__
    self.preso.set_template(self.settings.template_file)
  File "/usr/lib/python3.5/site-packages/odplib/preso.py", line 368, in set_template
    self.template_files.append(Template(template_file))
  File "/usr/lib/python3.5/site-packages/odplib/preso.py", line 1844, in __init__
    self.set_filepath(filepath)
  File "/usr/lib/python3.5/site-packages/odplib/preso.py", line 1849, in set_filepath
    self.styles = et.fromstring(self.zipfile.cat('styles.xml').encode('utf-8'))
AttributeError: 'bytes' object has no attribute 'encode'

Not really sure if mixing one random content and one random template file shoul work in the first place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant