[Bug 1184658] Re: Pngmath error handling code not compatible with Python 3

Launchpad Bug Tracker 1184658 at bugs.launchpad.net
Fri Jan 24 13:34:01 UTC 2014


** Branch linked: lp:ubuntu/trusty-proposed/sphinx

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sphinx in Ubuntu.
https://bugs.launchpad.net/bugs/1184658

Title:
  Pngmath error handling code not compatible with Python 3

Status in “sphinx” package in Ubuntu:
  Triaged

Bug description:
  Please refer to my thread at the upstream mailing list:
  https://groups.google.com/d/topic/sphinx-dev/FHgjgSYPYaU/discussion.
  It is not possible to use python3-sphinx on Raring for the simple
  reason that in Raring python3-sphinx is at v1.1.3 but python3 is at
  v3.3.1 and apparently one requires python3-sphinx v1.2 to use sphinx
  on python3 >= 3.3: see https://groups.google.com/d/msg/sphinx-
  dev/FHgjgSYPYaU/LffSg_-qCVEJ

  It doesn't seem as if this can be fixed on raring unless raring-
  updates can get python3-sphinx. I submit this bug to keep track of
  this.

  Console transcript showing bug:

  # Sphinx version: 1.1.3
  # Python version: 3.3.1
  # Docutils version: 0.10 release
  # Jinja2 version: 2.6
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/sphinx/ext/pngmath.py", line 188, in html_visit_math
      fname, depth = render_math(self, '$'+node['latex']+'$')
    File "/usr/lib/python3/dist-packages/sphinx/ext/pngmath.py", line 134, in render_math
      '[stdout]\n%s' % (stderr, stdout))
  sphinx.ext.pngmath.MathExtError: latex exited with error:
  [stderr]
  b''
  [stdout]
  b"This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)\n restricted \\write18 enabled.\nentering extended mode\n(./math.tex\nLaTeX2e <2011/06/27>\nBabel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, lo\naded.\n(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls\nDocument Class: article 2007/10/19 v1.4h Standard LaTeX document class\n(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo))\n(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty\n\n! LaTeX Error: File `utf8x.def' not found.\n\nType X to quit or <RETURN> to proceed,\nor enter new name. (Default extension: def)\n\nEnter file name: \n! Emergency stop.\n<read *> \n         \nl.131 \\endinput\n               ^^M\nNo pages of output.\nTranscript written on math.log.\n"

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/sphinx/cmdline.py", line 189, in main
      app.build(force_all, filenames)
    File "/usr/lib/python3/dist-packages/sphinx/application.py", line 204, in build
      self.builder.build_update()
    File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 196, in build_update
      'out of date' % len(to_build))
    File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 252, in build
      self.write(docnames, list(updated_docnames), method)
    File "/usr/lib/python3/dist-packages/sphinx/builders/__init__.py", line 292, in write
      self.write_doc(docname, doctree)
    File "/usr/lib/python3/dist-packages/sphinx/builders/html.py", line 419, in write_doc
      self.docwriter.write(doctree, destination)
    File "/usr/lib/python3/dist-packages/docutils/writers/__init__.py", line 80, in write
      self.translate()
    File "/usr/lib/python3/dist-packages/sphinx/writers/html.py", line 38, in translate
      self.document.walkabout(visitor)
    File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 174, in walkabout
      if child.walkabout(visitor):
    File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 174, in walkabout
      if child.walkabout(visitor):
    File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 174, in walkabout
      if child.walkabout(visitor):
    File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 174, in walkabout
      if child.walkabout(visitor):
    File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 166, in walkabout
      visitor.dispatch_visit(self)
    File "/usr/lib/python3/dist-packages/docutils/nodes.py", line 1627, in dispatch_visit
      return method(node)
    File "/usr/lib/python3/dist-packages/sphinx/ext/pngmath.py", line 190, in html_visit_math
      msg = str(str(exc), 'utf-8', 'replace')
  TypeError: decoding str is not supported

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sphinx/+bug/1184658/+subscriptions



More information about the foundations-bugs mailing list