[python3 pngmath throws struct.error

Marcin Wojdyr avatarMarcin Wojdyr created an issue

No description provided.

Comments (2)

  1. Marcin Wojdyr

    I've accidentally pressed enter when editing title and the issue was submitted without description. Then I wrote a long comment explaining the problem, but this comment is not displayed. Let's try again.

    conf.py file: https://github.com/wojdyr/fityk/blob/master/doc/conf.py

    It works with python2. If I remove pngmath extension, no exception is thrown. Here is what I get with python3 and pngmath:

    # Sphinx version: 1.1.3
    # Python version: 3.2.3
    # Docutils version: 0.8.1 release
    # Jinja2 version: 2.6
    Traceback (most recent call last):
      File "/usr/lib/python3.2/site-packages/sphinx/cmdline.py", line 189, in main
        app.build(force_all, filenames)
      File "/usr/lib/python3.2/site-packages/sphinx/application.py", line 200, in build
      File "/usr/lib/python3.2/site-packages/sphinx/builders/__init__.py", line 159, in build_all
        self.build(None, summary='all source files', method='all')
      File "/usr/lib/python3.2/site-packages/sphinx/builders/__init__.py", line 252, in build
        self.write(docnames, list(updated_docnames), method)
      File "/usr/lib/python3.2/site-packages/sphinx/builders/__init__.py", line 292, in write
        self.write_doc(docname, doctree)
      File "/usr/lib/python3.2/site-packages/sphinx/builders/html.py", line 419, in write_doc
        self.docwriter.write(doctree, destination)
      File "/usr/lib/python3.2/site-packages/docutils/writers/__init__.py", line 77, in write
      File "/usr/lib/python3.2/site-packages/sphinx/writers/html.py", line 38, in translate
      File "/usr/lib/python3.2/site-packages/docutils/nodes.py", line 173, in walkabout
        if child.walkabout(visitor):
      File "/usr/lib/python3.2/site-packages/docutils/nodes.py", line 173, in walkabout
        if child.walkabout(visitor):
      File "/usr/lib/python3.2/site-packages/docutils/nodes.py", line 173, in walkabout
        if child.walkabout(visitor):
      File "/usr/lib/python3.2/site-packages/docutils/nodes.py", line 165, in walkabout
      File "/usr/lib/python3.2/site-packages/docutils/nodes.py", line 1604, in dispatch_visit
        return method(node)
      File "/usr/lib/python3.2/site-packages/sphinx/ext/pngmath.py", line 213, in html_visit_displaymath
        fname, depth = render_math(self, latex)
      File "/usr/lib/python3.2/site-packages/sphinx/ext/pngmath.py", line 166, in render_math
        write_png_depth(outfn, depth)
      File "/usr/lib/python3.2/site-packages/sphinx/util/png.py", line 54, in write_png_depth
        f.write(struct.pack('!i', binascii.crc32(DEPTH_CHUNK_START + data)))
    struct.error: 'i' format requires -2147483648 <= number <= 2147483647
  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.