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

imgmath: Failed to build an image for equations during dvisvgm #9868

Closed
kloczek opened this issue Nov 18, 2021 · 14 comments · Fixed by #9886
Closed

imgmath: Failed to build an image for equations during dvisvgm #9868

kloczek opened this issue Nov 18, 2021 · 14 comments · Fixed by #9886

Comments

@kloczek
Copy link

kloczek commented Nov 18, 2021

Describe the bug

Pytest is failing in tests/test_util_inspect.py with error message about missing _testcapi module.
Second fail is in tests/test_ext_math.py::test_imgmath_svg unit.

How to Reproduce

I'm builing all my python modules as rpm packages so I'm unig below methodology:

  • "setup.py build"
  • "setup.py install --root </install/prefix>"
  • "pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

Expected behavior

No errors or fails.

Your project

N/A

Screenshots

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-4.3.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
libraries: Sphinx-4.3.0, docutils-0.17.1
base tempdir: /tmp/pytest-of-tkloczko/pytest-13
rootdir: /home/tkloczko/rpmbuild/BUILD/Sphinx-4.3.0, configfile: setup.cfg, testpaths: tests
plugins: rerunfailures-9.1.1, cov-2.12.1, forked-1.3.0, xdist-2.3.0, flake8-1.0.7, shutil-1.7.0, virtualenv-1.7.0, trio-0.7.0, mock-3.6.1, timeout-2.0.1, anyio-3.3.1, tornado-0.8.1, asyncio-0.15.1, httpbin-1.0.0, hypothesis-6.14.6, subtests-0.5.0, localserver-0.5.0, flaky-3.7.0
collected 1707 items / 1 error / 1706 selected

================================================================================== ERRORS ==================================================================================
_______________________________________________________________ ERROR collecting tests/test_util_inspect.py ________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/Sphinx-4.3.0/tests/test_util_inspect.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_util_inspect.py:19: in <module>
    import _testcapi
E   ModuleNotFoundError: No module named '_testcapi'
========================================================================= short test summary info ==========================================================================
ERROR tests/test_util_inspect.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================ 1 error in 19.48s =============================================================================

After ignore tests/test_util_inspect.py:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-4.3.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-4.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --ignore tests/test_util_inspect.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
libraries: Sphinx-4.3.0, docutils-0.17.1
base tempdir: /tmp/pytest-of-tkloczko/pytest-16
rootdir: /home/tkloczko/rpmbuild/BUILD/Sphinx-4.3.0, configfile: setup.cfg, testpaths: tests
plugins: rerunfailures-9.1.1, cov-2.12.1, forked-1.3.0, xdist-2.3.0, flake8-1.0.7, shutil-1.7.0, virtualenv-1.7.0, trio-0.7.0, mock-3.6.1, timeout-2.0.1, anyio-3.3.1, tornado-0.8.1, asyncio-0.15.1, httpbin-1.0.0, hypothesis-6.14.6, subtests-0.5.0, localserver-0.5.0, flaky-3.7.0
collected 1707 items

tests/test_api_translator.py ...........                                                                                                                             [  0%]
tests/test_application.py .......                                                                                                                                    [  1%]
tests/test_build.py ..........                                                                                                                                       [  1%]
tests/test_build_changes.py ..                                                                                                                                       [  1%]
tests/test_build_dirhtml.py .                                                                                                                                        [  1%]
tests/test_build_epub.py ..........s                                                                                                                                 [  2%]
tests/test_build_gettext.py .......                                                                                                                                  [  2%]
tests/test_build_html.py ........................................................................................................................................... [ 11%]
.................................................................................................................................................................... [ 20%]
.................................................................................................................................................................... [ 30%]
............................................................                                                                                                         [ 33%]
tests/test_build_latex.py .................................................................................                                                          [ 38%]
tests/test_build_linkcheck.py .............................                                                                                                          [ 40%]
tests/test_build_manpage.py ......                                                                                                                                   [ 40%]
tests/test_build_texinfo.py ......                                                                                                                                   [ 40%]
tests/test_build_text.py ...............                                                                                                                             [ 41%]
tests/test_builder.py ..                                                                                                                                             [ 41%]
tests/test_catalogs.py ...                                                                                                                                           [ 42%]
tests/test_config.py ..................................                                                                                                              [ 44%]
tests/test_correct_year.py ...                                                                                                                                       [ 44%]
tests/test_directive_code.py .......................................                                                                                                 [ 46%]
tests/test_directive_only.py .                                                                                                                                       [ 46%]
tests/test_directive_other.py .......                                                                                                                                [ 46%]
tests/test_directive_patch.py ...                                                                                                                                    [ 47%]
tests/test_docutilsconf.py ..                                                                                                                                        [ 47%]
tests/test_domain_c.py ..........................                                                                                                                    [ 48%]
tests/test_domain_cpp.py .................................                                                                                                           [ 50%]
tests/test_domain_js.py .........                                                                                                                                    [ 51%]
tests/test_domain_py.py ...............................................                                                                                              [ 54%]
tests/test_domain_rst.py ........                                                                                                                                    [ 54%]
tests/test_domain_std.py ...................                                                                                                                         [ 55%]
tests/test_environment.py ....                                                                                                                                       [ 55%]
tests/test_environment_indexentries.py ........                                                                                                                      [ 56%]
tests/test_environment_toctree.py .........                                                                                                                          [ 56%]
tests/test_errors.py ..                                                                                                                                              [ 56%]
tests/test_events.py ..                                                                                                                                              [ 57%]
tests/test_ext_apidoc.py ........................                                                                                                                    [ 58%]
tests/test_ext_autodoc.py ...................................................s..................                                                                     [ 62%]
tests/test_ext_autodoc_autoattribute.py ..............                                                                                                               [ 63%]
tests/test_ext_autodoc_autoclass.py .................                                                                                                                [ 64%]
tests/test_ext_autodoc_autodata.py ........                                                                                                                          [ 64%]
tests/test_ext_autodoc_autofunction.py .............                                                                                                                 [ 65%]
tests/test_ext_autodoc_automodule.py .....                                                                                                                           [ 65%]
tests/test_ext_autodoc_autoproperty.py ...                                                                                                                           [ 66%]
tests/test_ext_autodoc_configs.py .........................                                                                                                          [ 67%]
tests/test_ext_autodoc_events.py ......                                                                                                                              [ 67%]
tests/test_ext_autodoc_mock.py .......                                                                                                                               [ 68%]
tests/test_ext_autodoc_preserve_defaults.py .                                                                                                                        [ 68%]
tests/test_ext_autodoc_private_members.py ...                                                                                                                        [ 68%]
tests/test_ext_autosectionlabel.py ...                                                                                                                               [ 68%]
tests/test_ext_autosummary.py .......................                                                                                                                [ 70%]
tests/test_ext_coverage.py ....                                                                                                                                      [ 70%]
tests/test_ext_doctest.py ......                                                                                                                                     [ 70%]
tests/test_ext_duration.py .                                                                                                                                         [ 70%]
tests/test_ext_githubpages.py ...                                                                                                                                    [ 70%]
tests/test_ext_graphviz.py .....                                                                                                                                     [ 71%]
tests/test_ext_ifconfig.py .                                                                                                                                         [ 71%]
tests/test_ext_inheritance_diagram.py ......                                                                                                                         [ 71%]
tests/test_ext_intersphinx.py ...................                                                                                                                    [ 72%]
tests/test_ext_math.py .F..............                                                                                                                              [ 73%]
tests/test_ext_napoleon.py .................                                                                                                                         [ 74%]
tests/test_ext_napoleon_docstring.py ................................................                                                                                [ 77%]
tests/test_ext_napoleon_iterators.py ................                                                                                                                [ 78%]
tests/test_ext_todo.py ...                                                                                                                                           [ 78%]
tests/test_ext_viewcode.py .....                                                                                                                                     [ 78%]
tests/test_extension.py .                                                                                                                                            [ 78%]
tests/test_highlighting.py .....                                                                                                                                     [ 79%]
tests/test_intl.py ...................................................                                                                                               [ 82%]
tests/test_locale.py ...                                                                                                                                             [ 82%]
tests/test_markup.py ....................................                                                                                                            [ 84%]
tests/test_metadata.py .                                                                                                                                             [ 84%]
tests/test_parser.py .                                                                                                                                               [ 84%]
tests/test_project.py ...                                                                                                                                            [ 84%]
tests/test_pycode.py ........                                                                                                                                        [ 85%]
tests/test_pycode_ast.py ..........................................                                                                                                  [ 87%]
tests/test_pycode_parser.py .............................                                                                                                            [ 89%]
tests/test_quickstart.py ..........                                                                                                                                  [ 89%]
tests/test_roles.py .                                                                                                                                                [ 90%]
tests/test_search.py ...........                                                                                                                                     [ 90%]
tests/test_setup_command.py .......                                                                                                                                  [ 91%]
tests/test_smartquotes.py ..........                                                                                                                                 [ 91%]
tests/test_templating.py ...                                                                                                                                         [ 91%]
tests/test_theming.py .......                                                                                                                                        [ 92%]
tests/test_toctree.py ...                                                                                                                                            [ 92%]
tests/test_transforms_post_transforms.py ...                                                                                                                         [ 92%]
tests/test_transforms_post_transforms_code.py ...                                                                                                                    [ 92%]
tests/test_util.py ........                                                                                                                                          [ 93%]
tests/test_util_docstrings.py ...                                                                                                                                    [ 93%]
tests/test_util_docutils.py ...                                                                                                                                      [ 93%]
tests/test_util_fileutil.py ..                                                                                                                                       [ 93%]
tests/test_util_i18n.py .......                                                                                                                                      [ 94%]
tests/test_util_images.py ....                                                                                                                                       [ 94%]
tests/test_util_inventory.py ...                                                                                                                                     [ 94%]
tests/test_util_jsdump.py .                                                                                                                                          [ 94%]
tests/test_util_logging.py .................                                                                                                                         [ 95%]
tests/test_util_matching.py ..                                                                                                                                       [ 95%]
tests/test_util_nodes.py ..........................                                                                                                                  [ 97%]
tests/test_util_rst.py .......                                                                                                                                       [ 97%]
tests/test_util_template.py ..                                                                                                                                       [ 97%]
tests/test_util_typing.py .........ss....ss.......s..                                                                                                                [ 99%]
tests/test_versioning.py ..........                                                                                                                                  [ 99%]
tests/test_writer_latex.py .                                                                                                                                         [100%]

================================================================================= FAILURES =================================================================================
_____________________________________________________________________________ test_imgmath_svg _____________________________________________________________________________

command = ['dvisvgm', '-o', '/tmp/tmp9jki3pqi/math.svg', '--no-fonts', '/tmp/tmp9jki3pqi/math.dvi'], name = 'dvisvgm'

    def convert_dvi_to_image(command: List[str], name: str) -> Tuple[str, str]:
        """Convert DVI file to specific image format."""
        try:
>           ret = subprocess.run(command, stdout=PIPE, stderr=PIPE, check=True, encoding='ascii')

sphinx/ext/imgmath.py:152:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input = None, capture_output = False, timeout = None, check = True, popenargs = (['dvisvgm', '-o', '/tmp/tmp9jki3pqi/math.svg', '--no-fonts', '/tmp/tmp9jki3pqi/math.dvi'],)
kwargs = {'encoding': 'ascii', 'stderr': -1, 'stdout': -1}, process = <subprocess.Popen object at 0x7f94bc49da30>
stdout = 'While reading gs_ll3.ps:\nError: /undefinedfilename in --resourceforall--\nOperand stack:\n   (gs_icc.ps\\000gs_mex_e...o)(G)--\nCurrent allocation mode is global\nLast OS error: No such file or directory\nCurrent file position is 18949\n'
stderr = 'PostScript error: invalidaccess in def\nOperand stack:\n    gs_icc.ps\n', retcode = 254

    def run(*popenargs,
            input=None, capture_output=False, timeout=None, check=False, **kwargs):
        """Run command with arguments and return a CompletedProcess instance.

        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.

        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.

        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.

        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.

        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.

        The other arguments are the same as for the Popen constructor.
        """
        if input is not None:
            if kwargs.get('stdin') is not None:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE

        if capture_output:
            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
                raise ValueError('stdout and stderr arguments may not be used '
                                 'with capture_output.')
            kwargs['stdout'] = PIPE
            kwargs['stderr'] = PIPE

        with Popen(*popenargs, **kwargs) as process:
            try:
                stdout, stderr = process.communicate(input, timeout=timeout)
            except TimeoutExpired as exc:
                process.kill()
                if _mswindows:
                    # Windows accumulates the output in a single blocking
                    # read() call run on child threads, with the timeout
                    # being done in a join() on those threads.  communicate()
                    # _after_ kill() is required to collect that and add it
                    # to the exception.
                    exc.stdout, exc.stderr = process.communicate()
                else:
                    # POSIX _communicate already populated the output so
                    # far into the TimeoutExpired exception.
                    process.wait()
                raise
            except:  # Including KeyboardInterrupt, communicate handled that.
                process.kill()
                # We don't call process.wait() as .__exit__ does that for us.
                raise
            retcode = process.poll()
            if check and retcode:
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '['dvisvgm', '-o', '/tmp/tmp9jki3pqi/math.svg', '--no-fonts', '/tmp/tmp9jki3pqi/math.dvi']' returned non-zero exit status 254.

/usr/lib64/python3.8/subprocess.py:516: CalledProcessError

During handling of the above exception, another exception occurred:

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x7f94bc4b1b80>, warning = <_io.StringIO object at 0x7f94bc4b1af0>

    @pytest.mark.skipif(not has_binary('dvisvgm'),
                        reason='Requires dvisvgm" binary')
    @pytest.mark.sphinx('html', testroot='ext-math-simple',
                        confoverrides={'extensions': ['sphinx.ext.imgmath'],
                                       'imgmath_image_format': 'svg'})
    def test_imgmath_svg(app, status, warning):
>       app.builder.build_all()

tests/test_ext_math.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sphinx/builders/__init__.py:258: in build_all
    self.build(None, summary=__('all source files'), method='all')
sphinx/builders/__init__.py:358: in build
    self.write(docnames, list(updated_docnames), method)
sphinx/builders/__init__.py:532: in write
    self._write_serial(sorted(docnames))
sphinx/builders/__init__.py:542: in _write_serial
    self.write_doc(docname, doctree)
sphinx/builders/html/__init__.py:626: in write_doc
    self.docwriter.write(doctree, destination)
/usr/lib/python3.8/site-packages/docutils/writers/__init__.py:78: in write
    self.translate()
sphinx/writers/html.py:71: in translate
    self.document.walkabout(visitor)
/usr/lib/python3.8/site-packages/docutils/nodes.py:227: in walkabout
    if child.walkabout(visitor):
/usr/lib/python3.8/site-packages/docutils/nodes.py:227: in walkabout
    if child.walkabout(visitor):
/usr/lib/python3.8/site-packages/docutils/nodes.py:219: in walkabout
    visitor.dispatch_visit(self)
sphinx/util/docutils.py:477: in dispatch_visit
    method(node)
sphinx/writers/html5.py:802: in visit_math_block
    visit(self, node)
sphinx/ext/imgmath.py:320: in html_visit_displaymath
    fname, depth = render_math(self, latex)
sphinx/ext/imgmath.py:263: in render_math
    imgpath, depth = convert_dvi_to_svg(dvipath, self.builder)
sphinx/ext/imgmath.py:199: in convert_dvi_to_svg
    stdout, stderr = convert_dvi_to_image(command, name)
sphinx/ext/imgmath.py:160: in convert_dvi_to_image
    raise MathExtError('%s exited with error' % name, exc.stderr, exc.stdout) from exc
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = MathExtError('dvisvgm exited with error', 'PostScript error: invalidaccess in def\nOperand stack:\n    gs_icc.ps\n', '...)(G)--\nCurrent allocation mode is global\nLast OS error: No such file or directory\nCurrent file position is 18949\n')
msg = 'dvisvgm exited with error', stderr = 'PostScript error: invalidaccess in def\nOperand stack:\n    gs_icc.ps\n'
stdout = 'While reading gs_ll3.ps:\nError: /undefinedfilename in --resourceforall--\nOperand stack:\n   (gs_icc.ps\\000gs_mex_e...o)(G)--\nCurrent allocation mode is global\nLast OS error: No such file or directory\nCurrent file position is 18949\n'

    def __init__(self, msg: str, stderr: bytes = None, stdout: bytes = None) -> None:
        if stderr:
>           msg += '\n[stderr]\n' + stderr.decode(sys.getdefaultencoding(), 'replace')
E           AttributeError: 'str' object has no attribute 'decode'

sphinx/ext/imgmath.py:48: AttributeError
------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-tkloczko/pytest-16/ext-math-simple
# outdir: /tmp/pytest-of-tkloczko/pytest-16/ext-math-simple/_build/html
# status:
Running Sphinx v4.3.0
loading pickled environment... done
building [html]: all source files
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
preparing documents... done
writing output... [100%] index
# warning:

============================================================================= warnings summary =============================================================================
tests/test_build_linkcheck.py::test_invalid_ssl
  /home/tkloczko/rpmbuild/BUILD/Sphinx-4.3.0/sphinx/builders/linkcheck.py:490: ResourceWarning: unclosed <eventlet.green.ssl.GreenSSLSocket fd=41, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 47566), raddr=('127.0.0.1', 7777)>
    return 'broken', str(err), 0

tests/test_build_linkcheck.py::test_invalid_ssl
  /home/tkloczko/rpmbuild/BUILD/Sphinx-4.3.0/sphinx/builders/linkcheck.py:490: ResourceWarning: unclosed <eventlet.green.ssl.GreenSSLSocket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 47564), raddr=('127.0.0.1', 7777)>
    return 'broken', str(err), 0

tests/test_build_linkcheck.py::test_connect_to_selfsigned_fails
  /home/tkloczko/rpmbuild/BUILD/Sphinx-4.3.0/sphinx/builders/linkcheck.py:490: ResourceWarning: unclosed <eventlet.green.ssl.GreenSSLSocket fd=43, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 47570), raddr=('127.0.0.1', 7777)>
    return 'broken', str(err), 0

tests/test_build_linkcheck.py::test_connect_to_selfsigned_fails
  /home/tkloczko/rpmbuild/BUILD/Sphinx-4.3.0/sphinx/builders/linkcheck.py:490: ResourceWarning: unclosed <eventlet.green.ssl.GreenSSLSocket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 47568), raddr=('127.0.0.1', 7777)>
    return 'broken', str(err), 0

tests/test_theming.py::test_theme_api
tests/test_theming.py::test_theme_api
tests/test_theming.py::test_theme_api
tests/test_theming.py::test_theme_api
  /home/tkloczko/rpmbuild/BUILD/Sphinx-4.3.0/sphinx/application.py:1288: RemovedInSphinx60Warning: app.html_themes is deprecated.
    warnings.warn('app.html_themes is deprecated.',

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_build_epub.py:378: Skipped because DO_EPUBCHECK is not set
SKIPPED [1] tests/test_ext_autodoc.py:1988: py39+ is required.
SKIPPED [1] tests/test_util_typing.py:152: python 3.9+ is required.
SKIPPED [1] tests/test_util_typing.py:162: python 3.10+ is required.
SKIPPED [1] tests/test_util_typing.py:204: python 3.9+ is required.
SKIPPED [1] tests/test_util_typing.py:216: python 3.9+ is required.
SKIPPED [1] tests/test_util_typing.py:295: python 3.10+ is required.
FAILED tests/test_ext_math.py::test_imgmath_svg - AttributeError: 'str' object has no attribute 'decode'
==================================================== 1 failed, 1699 passed, 7 skipped, 8 warnings in 358.18s (0:05:58) =====================================================

OS

Linux/x86_64

Python version

3.8.12

Sphinx version

4.3.0

Sphinx extensions

N/A

Extra tools

N/A

Additional context

N/A

@tk0miya tk0miya added this to the 4.3.1 milestone Nov 23, 2021
tk0miya added a commit to tk0miya/sphinx that referenced this issue Nov 23, 2021
@tk0miya
Copy link
Member

tk0miya commented Nov 23, 2021

Thank you for reporting.

Second fail is in tests/test_ext_math.py::test_imgmath_svg unit.

It seems the imgmath extension crashes on reporting the error from dvisvgm. I posted the fix #9886 for the error handling. But it will not resolve the root cause of the error.

tk0miya added a commit to tk0miya/sphinx that referenced this issue Nov 23, 2021
@kloczek
Copy link
Author

kloczek commented Nov 23, 2021

It seems the imgmath extension crashes on reporting the error from dvisvgm. I posted the fix #9886 for the error handling. But it will not resolve the root cause of the error.

Do you want me to test that PR?

@tk0miya
Copy link
Member

tk0miya commented Nov 23, 2021

Yes, it's helpful :-)

@kloczek
Copy link
Author

kloczek commented Nov 23, 2021

Here is the result with that PR:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-4.3.0-2.1.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-4.3.0-2.1.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
libraries: Sphinx-4.3.0, docutils-0.17.1
base tempdir: /tmp/pytest-of-tkloczko/pytest-2
rootdir: /home/tkloczko/rpmbuild/BUILD/Sphinx-4.3.0, configfile: setup.cfg, testpaths: tests
plugins: shutil-1.7.0, virtualenv-1.7.0, mock-3.6.1, hypothesis-6.14.6, cov-2.12.1, asyncio-0.15.1, anyio-3.3.4, forked-1.3.0, xdist-2.3.0, flaky-3.7.0, tornasync-0.6.0.post2, console-scripts-1.2.0
collected 1747 items

tests/test_api_translator.py ...........                                                                                                                             [  0%]
tests/test_application.py .......                                                                                                                                    [  1%]
tests/test_build.py ..........                                                                                                                                       [  1%]
tests/test_build_changes.py ..                                                                                                                                       [  1%]
tests/test_build_dirhtml.py .                                                                                                                                        [  1%]
tests/test_build_epub.py ..........s                                                                                                                                 [  2%]
tests/test_build_gettext.py .......                                                                                                                                  [  2%]
tests/test_build_html.py ........................................................................................................................................... [ 10%]
.................................................................................................................................................................... [ 20%]
.................................................................................................................................................................... [ 29%]
............................................................                                                                                                         [ 32%]
tests/test_build_latex.py .................................................................................                                                          [ 37%]
tests/test_build_linkcheck.py .............................                                                                                                          [ 39%]
tests/test_build_manpage.py ......                                                                                                                                   [ 39%]
tests/test_build_texinfo.py ......                                                                                                                                   [ 39%]
tests/test_build_text.py ...............                                                                                                                             [ 40%]
tests/test_builder.py ..                                                                                                                                             [ 40%]
tests/test_catalogs.py ...                                                                                                                                           [ 41%]
tests/test_config.py ..................................                                                                                                              [ 43%]
tests/test_correct_year.py ...                                                                                                                                       [ 43%]
tests/test_directive_code.py .......................................                                                                                                 [ 45%]
tests/test_directive_only.py .                                                                                                                                       [ 45%]
tests/test_directive_other.py .......                                                                                                                                [ 45%]
tests/test_directive_patch.py ...                                                                                                                                    [ 46%]
tests/test_docutilsconf.py ..                                                                                                                                        [ 46%]
tests/test_domain_c.py ..........................                                                                                                                    [ 47%]
tests/test_domain_cpp.py .................................                                                                                                           [ 49%]
tests/test_domain_js.py .........                                                                                                                                    [ 50%]
tests/test_domain_py.py ...............................................                                                                                              [ 52%]
tests/test_domain_rst.py ........                                                                                                                                    [ 53%]
tests/test_domain_std.py ...................                                                                                                                         [ 54%]
tests/test_environment.py ....                                                                                                                                       [ 54%]
tests/test_environment_indexentries.py ........                                                                                                                      [ 55%]
tests/test_environment_toctree.py .........                                                                                                                          [ 55%]
tests/test_errors.py ..                                                                                                                                              [ 55%]
tests/test_events.py ..                                                                                                                                              [ 55%]
tests/test_ext_apidoc.py ........................                                                                                                                    [ 57%]
tests/test_ext_autodoc.py ...................................................s.....s............                                                                     [ 61%]
tests/test_ext_autodoc_autoattribute.py ..............                                                                                                               [ 61%]
tests/test_ext_autodoc_autoclass.py .................                                                                                                                [ 62%]
tests/test_ext_autodoc_autodata.py ........                                                                                                                          [ 63%]
tests/test_ext_autodoc_autofunction.py .............                                                                                                                 [ 64%]
tests/test_ext_autodoc_automodule.py .....                                                                                                                           [ 64%]
tests/test_ext_autodoc_autoproperty.py ...                                                                                                                           [ 64%]
tests/test_ext_autodoc_configs.py .........................                                                                                                          [ 65%]
tests/test_ext_autodoc_events.py ......                                                                                                                              [ 66%]
tests/test_ext_autodoc_mock.py .......                                                                                                                               [ 66%]
tests/test_ext_autodoc_preserve_defaults.py .                                                                                                                        [ 66%]
tests/test_ext_autodoc_private_members.py ...                                                                                                                        [ 66%]
tests/test_ext_autosectionlabel.py ...                                                                                                                               [ 67%]
tests/test_ext_autosummary.py .......................                                                                                                                [ 68%]
tests/test_ext_coverage.py ....                                                                                                                                      [ 68%]
tests/test_ext_doctest.py ......                                                                                                                                     [ 69%]
tests/test_ext_duration.py .                                                                                                                                         [ 69%]
tests/test_ext_githubpages.py ...                                                                                                                                    [ 69%]
tests/test_ext_graphviz.py .....                                                                                                                                     [ 69%]
tests/test_ext_ifconfig.py .                                                                                                                                         [ 69%]
tests/test_ext_inheritance_diagram.py ......                                                                                                                         [ 69%]
tests/test_ext_intersphinx.py ...................                                                                                                                    [ 71%]
tests/test_ext_math.py .F..............                                                                                                                              [ 71%]
tests/test_ext_napoleon.py .................                                                                                                                         [ 72%]
tests/test_ext_napoleon_docstring.py ................................................                                                                                [ 75%]
tests/test_ext_napoleon_iterators.py ................                                                                                                                [ 76%]
tests/test_ext_todo.py ...                                                                                                                                           [ 76%]
tests/test_ext_viewcode.py .....                                                                                                                                     [ 77%]
tests/test_extension.py .                                                                                                                                            [ 77%]
tests/test_highlighting.py .....                                                                                                                                     [ 77%]
tests/test_intl.py ...................................................                                                                                               [ 80%]
tests/test_locale.py ...                                                                                                                                             [ 80%]
tests/test_markup.py ....................................                                                                                                            [ 82%]
tests/test_metadata.py .                                                                                                                                             [ 82%]
tests/test_parser.py .                                                                                                                                               [ 82%]
tests/test_project.py ...                                                                                                                                            [ 82%]
tests/test_pycode.py ........                                                                                                                                        [ 83%]
tests/test_pycode_ast.py ..........................................                                                                                                  [ 85%]
tests/test_pycode_parser.py .............................                                                                                                            [ 87%]
tests/test_quickstart.py ..........                                                                                                                                  [ 87%]
tests/test_roles.py .                                                                                                                                                [ 87%]
tests/test_search.py ...........                                                                                                                                     [ 88%]
tests/test_setup_command.py .......                                                                                                                                  [ 89%]
tests/test_smartquotes.py ..........                                                                                                                                 [ 89%]
tests/test_templating.py ...                                                                                                                                         [ 89%]
tests/test_theming.py .......                                                                                                                                        [ 90%]
tests/test_toctree.py ...                                                                                                                                            [ 90%]
tests/test_transforms_post_transforms.py ...                                                                                                                         [ 90%]
tests/test_transforms_post_transforms_code.py ...                                                                                                                    [ 90%]
tests/test_util.py ........                                                                                                                                          [ 91%]
tests/test_util_docstrings.py ...                                                                                                                                    [ 91%]
tests/test_util_docutils.py ...                                                                                                                                      [ 91%]
tests/test_util_fileutil.py ..                                                                                                                                       [ 91%]
tests/test_util_i18n.py .......                                                                                                                                      [ 91%]
tests/test_util_images.py ....                                                                                                                                       [ 92%]
tests/test_util_inspect.py ........................................                                                                                                  [ 94%]
tests/test_util_inventory.py ...                                                                                                                                     [ 94%]
tests/test_util_jsdump.py .                                                                                                                                          [ 94%]
tests/test_util_logging.py .................                                                                                                                         [ 95%]
tests/test_util_matching.py ..                                                                                                                                       [ 95%]
tests/test_util_nodes.py ..........................                                                                                                                  [ 97%]
tests/test_util_rst.py .......                                                                                                                                       [ 97%]
tests/test_util_template.py ..                                                                                                                                       [ 97%]
tests/test_util_typing.py .........ss....ss.......s..                                                                                                                [ 99%]
tests/test_versioning.py ..........                                                                                                                                  [ 99%]
tests/test_writer_latex.py .                                                                                                                                         [100%]

================================================================================= FAILURES =================================================================================
_____________________________________________________________________________ test_imgmath_svg _____________________________________________________________________________

app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x7fe2158789d0>, warning = <_io.StringIO object at 0x7fe215878700>

    @pytest.mark.skipif(not has_binary('dvisvgm'),
                        reason='Requires dvisvgm" binary')
    @pytest.mark.sphinx('html', testroot='ext-math-simple',
                        confoverrides={'extensions': ['sphinx.ext.imgmath'],
                                       'imgmath_image_format': 'svg'})
    def test_imgmath_svg(app, status, warning):
        app.builder.build_all()
        if "LaTeX command 'latex' cannot be run" in warning.getvalue():
            raise pytest.skip.Exception('LaTeX command "latex" is not available')
        if "dvisvgm command 'dvisvgm' cannot be run" in warning.getvalue():
            raise pytest.skip.Exception('dvisvgm command "dvisvgm" is not available')

        content = (app.outdir / 'index.html').read_text()
        html = (r'<div class="math">\s*<p>\s*<img src="_images/math/\w+.svg"'
                r'\s*alt="a\^2\+b\^2=c\^2"/>\s*</p>\s*</div>')
>       assert re.search(html, content, re.S)
E       assert None
E        +  where None = <function search at 0x7fe21b6039d0>('<div class="math">\\s*<p>\\s*<img src="_images/math/\\w+.svg"\\s*alt="a\\^2\\+b\\^2=c\\^2"/>\\s*</p>\\s*</div>', '\n<!DOCTYPE html>\n\n<html>\n  <head>\n    <meta charset="utf-8" />\n    <meta name="viewport" content="width=device-...ref="_sources/index.rst.txt"\n          rel="nofollow">Page source</a>\n    </div>\n\n    \n\n    \n  </body>\n</html>', re.DOTALL)
E        +    where <function search at 0x7fe21b6039d0> = re.search
E        +    and   re.DOTALL = re.S

tests/test_ext_math.py:64: AssertionError
------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-tkloczko/pytest-2/ext-math-simple
# outdir: /tmp/pytest-of-tkloczko/pytest-2/ext-math-simple/_build/html
# status:
Running Sphinx v4.3.0
loading pickled environment... done
building [html]: all source files
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
preparing documents... done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done

# warning:
WARNING: inline latex 'a^2+b^2=c^2\n\n': dvisvgm exited with error
[stderr]
PostScript error: invalidaccess in def
Operand stack:
    gs_icc.ps

[stdout]
While reading gs_ll3.ps:
Error: /undefinedfilename in --resourceforall--
Operand stack:
   (gs_icc.ps\000gs_mex_e.ps\000gs_mro_e.ps\000gs_pdf_e.ps\000gs_wan_e.ps\000pdf_ops.ps\000pdf_rbld.ps\000pdf_base.ps\000pdf_draw.ps\000gs_cff.ps\000gs_mgl_e.ps\000gs_ttf.ps\000pdf_font.ps\000pdf_main.ps\000pdf_sec.ps\000gs_epsf.ps\000gs_pdfwr.ps)   (gs_ll3.ps)   1   --nostringval--   --nostringval--   9   --nostringval--   37   (%{datadir}/fonts/urw-base35/IdiomSet/*)   --nostringval--   (/usr/share/ghostscript/Resource/ProcSet/CIDInit\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000...)
Execution stack:
   %interp_exit   --nostringval--   resourceforall   %loop_continue   resourceforall   resourceforall   resourceforall   false   1   %stopped_push   --nostringval--   1903   7   5   %oparray_pop   resourceforall   resourceforall   10   2   13   resourceforall   %for_pos_int_continue   resourceforall
Dictionary stack:
   --dict:1037/1123(G)--   --dict:0/20(G)--   --dict:72/200(L)--   --dict:1037/1123(G)--   --dict:37/43(G)--   --dict:16/18(ro)(G)--
Current allocation mode is global
Last OS error: No such file or directory
Current file position is 18949


============================================================================= warnings summary =============================================================================
tests/test_theming.py::test_theme_api
tests/test_theming.py::test_theme_api
tests/test_theming.py::test_theme_api
tests/test_theming.py::test_theme_api
  /home/tkloczko/rpmbuild/BUILD/Sphinx-4.3.0/sphinx/application.py:1288: RemovedInSphinx60Warning: app.html_themes is deprecated.
    warnings.warn('app.html_themes is deprecated.',

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_build_epub.py:378: Skipped because DO_EPUBCHECK is not set
SKIPPED [1] tests/test_ext_autodoc.py:1988: py39+ is required.
SKIPPED [1] tests/test_ext_autodoc.py:2117: cython is not installed
SKIPPED [1] tests/test_util_typing.py:152: python 3.9+ is required.
SKIPPED [1] tests/test_util_typing.py:162: python 3.10+ is required.
SKIPPED [1] tests/test_util_typing.py:204: python 3.9+ is required.
SKIPPED [1] tests/test_util_typing.py:216: python 3.9+ is required.
SKIPPED [1] tests/test_util_typing.py:295: python 3.10+ is required.
FAILED tests/test_ext_math.py::test_imgmath_svg - assert None
==================================================== 1 failed, 1738 passed, 8 skipped, 4 warnings in 189.83s (0:03:09) =====================================================

tk0miya added a commit that referenced this issue Nov 25, 2021
@tk0miya
Copy link
Member

tk0miya commented Nov 25, 2021

It seems dvisvgm failed to convert an equation to an image. Could you check it is surely working from command line as I commented here #8208 (comment)?

@kloczek
Copy link
Author

kloczek commented Nov 25, 2021

[tkloczko@ss-desktop SPECS]$ latex test.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-05-07>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo))
(/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amscls/amsthm.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/share/texlive/texmf-dist/tex/latex/anyfontsize/anyfontsize.sty)
(/usr/share/texlive/texmf-dist/tex/latex/tools/bm.sty)
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
No file test.aux.
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd) [1] (./test.aux) )
Output written on test.dvi (1 page, 336 bytes).
Transcript written on test.log.
[tkloczko@ss-desktop SPECS]$ dvisvgm -o math.svg test.dvi
While reading gs_ll3.ps:
Error: /undefinedfilename in --resourceforall--
Operand stack:
   (gs_icc.ps\000gs_mex_e.ps\000gs_mro_e.ps\000gs_pdf_e.ps\000gs_wan_e.ps\000pdf_ops.ps\000pdf_rbld.ps\000pdf_base.ps\000pdf_draw.ps\000gs_cff.ps\000gs_mgl_e.ps\000gs_ttf.ps\000pdf_font.ps\000pdf_main.ps\000pdf_sec.ps\000gs_epsf.ps\000gs_pdfwr.ps)   (gs_ll3.ps)   1   --nostringval--   --nostringval--   9   --nostringval--   37   (%{datadir}/fonts/urw-base35/IdiomSet/*)   --nostringval--   (/usr/share/ghostscript/Resource/ProcSet/CIDInit\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000...)
Execution stack:
   %interp_exit   --nostringval--   resourceforall   %loop_continue   resourceforall   resourceforall   resourceforall   false   1   %stopped_push   --nostringval--   1903   7   5   %oparray_pop   resourceforall   resourceforall   10   2   13   resourceforall   %for_pos_int_continue   resourceforall
Dictionary stack:
   --dict:1037/1123(G)--   --dict:0/20(G)--   --dict:72/200(L)--   --dict:1037/1123(G)--   --dict:37/43(G)--   --dict:16/18(ro)(G)--
Current allocation mode is global
Last OS error: No such file or directory
Current file position is 18949
PostScript error: invalidaccess in def
Operand stack:
    gs_icc.ps
[tkloczko@ss-desktop SPECS]$ strace -e trace=newfstatat dvisvgm -o math.svg test.dvi
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=161217, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=102888, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=776912, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=103232, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=25397048, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2273320, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=927656, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=107976, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2384256, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=77720, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=237064, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=892816, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=534448, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=575696, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=28192, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=126896, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=528464, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=410240, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=20904, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=254440, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=367384, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=133208, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1256592, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=55816, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=910896, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=444096, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=345800, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=53536, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=81512, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2038960, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1597032, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=488736, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=869400, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=94936, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=23800, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=62112, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=24344, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=4434848, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=71320, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=382824, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1277248, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=130352, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1588080, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=94672, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=303736, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=301968, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=679568, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=177920, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=175712, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=710760, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=49280, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=616560, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=143712, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=45048, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=1309336, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=153952, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
newfstatat(3, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/etc/crypto-policies/back-ends/gnutls.config", {st_mode=S_IFREG|0644, st_size=1413, ...}, 0) = 0
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=1413, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/home/tkloczko/.cache/dvisvgm", {st_mode=S_IFDIR|0755, st_size=0, ...}, 0) = 0
newfstatat(AT_FDCWD, "test.dvi", {st_mode=S_IFREG|0664, st_size=336, ...}, 0) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0755, st_size=54328, ...}, 0) = 0
newfstatat(AT_FDCWD, "/home/tkloczko/.local/bin/dvisvgm", 0x7ffca73586b0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/tkloczko/bin/dvisvgm", 0x7ffca73586b0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/bin/dvisvgm", {st_mode=S_IFREG|0755, st_size=4757976, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr", {st_mode=S_IFDIR|0755, st_size=100, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/usr/bin", {st_mode=S_IFDIR|0555, st_size=69602, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/usr/bin/dvisvgm", {st_mode=S_IFREG|0755, st_size=4757976, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(AT_FDCWD, "/home/tkloczko/rpmbuild/SPECS/ps2pk.map", 0x7ffca73584e0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/bin", {st_mode=S_IFDIR|0555, st_size=69602, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/bin/share/texlive/texmf-local/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/bin/share/texlive/texmf-dist/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/bin/share/texlive/texmf/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/bin/texmf-local/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/bin/texmf-dist/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/bin/texmf/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr", {st_mode=S_IFDIR|0755, st_size=100, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-dist/web2c", {st_mode=S_IFDIR|0755, st_size=732, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-dist/web2c/texmf.cnf", {st_mode=S_IFREG|0644, st_size=40136, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/texmf-local/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/texmf-dist/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/texmf/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/texmf-local/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/texlive", {st_mode=S_IFDIR|0755, st_size=340, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/share/texlive/texmf-local/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/texlive/share/texlive/texmf-dist/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/texlive/share/texlive/texmf/web2c", 0x7ffca73580a0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-dist/web2c/texmf.cnf", {st_mode=S_IFREG|0644, st_size=40136, ...}, 0) = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=40136, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=40136, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=32, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/texmf-compat", {st_mode=S_IFDIR|0755, st_size=6, ...}, 0) = 0
newfstatat(5, "", {st_mode=S_IFDIR|0755, st_size=6, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/texmf-compat/tex", {st_mode=S_IFDIR|0755, st_size=10, ...}, 0) = 0
newfstatat(6, "", {st_mode=S_IFDIR|0755, st_size=10, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/texmf-compat/tex/latex", {st_mode=S_IFDIR|0755, st_size=8, ...}, 0) = 0
newfstatat(7, "", {st_mode=S_IFDIR|0755, st_size=8, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/texmf-compat/tex/latex/misc", {st_mode=S_IFDIR|0755, st_size=108, ...}, 0) = 0
newfstatat(8, "", {st_mode=S_IFDIR|0755, st_size=108, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/texmf-compat/tex/latex/misc/linuxdoc-sgml.sty", {st_mode=S_IFREG|0644, st_size=4111, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/texmf-compat/tex/latex/misc/linuxdoctr-sgml.sty", {st_mode=S_IFREG|0644, st_size=805, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/texmf-compat/tex/latex/misc/null.sty", {st_mode=S_IFREG|0644, st_size=0, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/texmf-compat/tex/latex/misc/qwertz.sty", {st_mode=S_IFREG|0644, st_size=581, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/ls-R", {st_mode=S_IFREG|0644, st_size=263, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-local/ls-R", {st_mode=S_IFREG|0644, st_size=263, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-config", {st_mode=S_IFDIR|0755, st_size=18, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-config/ls-R", {st_mode=S_IFREG|0644, st_size=107, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-var", {st_mode=S_IFDIR|0755, st_size=28, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-var/ls-R", {st_mode=S_IFREG|0644, st_size=1124, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-dist", {st_mode=S_IFDIR|0755, st_size=170, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-dist/ls-R", {st_mode=S_IFREG|0644, st_size=224531, ...}, 0) = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=263, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=107, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=1124, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=224531, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=32, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=6, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=10, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=8, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=108, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=18, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=28, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=170, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, ".", {st_mode=S_IFDIR|0755, st_size=54328, ...}, 0) = 0
newfstatat(4, "", {st_mode=S_IFDIR|0755, st_size=54328, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/texlive/texmf-var/fonts/map/dvips/updmap/ps2pk.map", {st_mode=S_IFREG|0644, st_size=348970, ...}, 0) = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=94625, ...}, AT_EMPTY_PATH) = 0
newfstatat(4, "", {st_mode=S_IFREG|0644, st_size=94625, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=3143, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=3143, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=2722, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=2722, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=17859, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=17859, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=48531, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=48531, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=4059, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=4059, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=23998, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=23998, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=12765, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=12765, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=4756, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=4756, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=8771, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=8771, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=218021, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=218021, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=12543, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=12543, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=43883, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=43883, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/ghostscript/iccprofiles/default_gray.icc", {st_mode=S_IFREG|0644, st_size=2460, ...}, 0) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=42458, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=42458, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/ghostscript/Resource/Init/gs_init.ps", {st_mode=S_IFREG|0644, st_size=94625, ...}, 0) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=22482, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=22482, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=2096, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=2096, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=14155, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=14155, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/ghostscript/Resource/ProcSet/CIDInit", 0x7ffca7357610, 0) = -1 ENOENT (No such file or directory)
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=8505, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=8505, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=16827, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=16827, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=11389, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=11389, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1767, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1767, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=3104, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=3104, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2134, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2134, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=5847, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=5847, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=8069, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=8069, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2156, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2156, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/ghostscript/Resource/CIDFSubst/DroidSansFallback.ttf", {st_mode=S_IFREG|0644, st_size=4033576, ...}, 0) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=4033576, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=4033576, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=18715, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=18715, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=38491, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=38491, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=15611, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=15611, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1468, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1468, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1483, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1483, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=4560, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=4560, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=3780, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=3780, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=19580, ...}, AT_EMPTY_PATH) = 0
newfstatat(5, "", {st_mode=S_IFREG|0644, st_size=19580, ...}, AT_EMPTY_PATH) = 0
newfstatat(1, "", {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x2), ...}, AT_EMPTY_PATH) = 0
While reading gs_ll3.ps:
Error: /undefinedfilename in --resourceforall--
Operand stack:
   (gs_icc.ps\000gs_mex_e.ps\000gs_mro_e.ps\000gs_pdf_e.ps\000gs_wan_e.ps\000pdf_ops.ps\000pdf_rbld.ps\000pdf_base.ps\000pdf_draw.ps\000gs_cff.ps\000gs_mgl_e.ps\000gs_ttf.ps\000pdf_font.ps\000pdf_main.ps\000pdf_sec.ps\000gs_epsf.ps\000gs_pdfwr.ps)   (gs_ll3.ps)   1   --nostringval--   --nostringval--   9   --nostringval--   37   (%{datadir}/fonts/urw-base35/IdiomSet/*)   --nostringval--   (/usr/share/ghostscript/Resource/ProcSet/CIDInit\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000...)
Execution stack:
   %interp_exit   --nostringval--   resourceforall   %loop_continue   resourceforall   resourceforall   resourceforall   false   1   %stopped_push   --nostringval--   1903   7   5   %oparray_pop   resourceforall   resourceforall   10   2   13   resourceforall   %for_pos_int_continue   resourceforall
Dictionary stack:
   --dict:1037/1123(G)--   --dict:0/20(G)--   --dict:72/200(L)--   --dict:1037/1123(G)--   --dict:37/43(G)--   --dict:16/18(ro)(G)--
Current allocation mode is global
Last OS error: No such file or directory
Current file position is 18949
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2460, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2460, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2460, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2576, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2576, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2576, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=187484, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=187484, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=187484, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1972, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1972, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=1972, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2460, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2460, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=2460, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=3648, ...}, AT_EMPTY_PATH) = 0
newfstatat(6, "", {st_mode=S_IFREG|0644, st_size=3648, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/usr/share/ghostscript/Resource/Halftone/Default", 0x7ffca7357b40, 0) = -1 ENOENT (No such file or directory)
PostScript error: invalidaccess in def
Operand stack:
    gs_icc.ps
+++ exited with 254 +++

Does it mean that something is wrong with my gs?🤔

@tk0miya
Copy link
Member

tk0miya commented Nov 25, 2021

I'm not sure. I need help from LaTeX experts.

@tk0miya tk0miya reopened this Nov 25, 2021
@kloczek
Copy link
Author

kloczek commented Nov 25, 2021

Should I try that commit?

@tk0miya
Copy link
Member

tk0miya commented Nov 27, 2021

What do you mean? Nothing has changed.

@tk0miya tk0miya modified the milestones: 4.3.1, 4.4.0 Nov 27, 2021
@tk0miya tk0miya changed the title 4.3.0: pytest is failing imgmath: Failed to build an image for equations during dvisvgm Nov 27, 2021
@tk0miya tk0miya removed this from the 4.4.0 milestone Dec 19, 2021
@kloczek
Copy link
Author

kloczek commented Apr 23, 2022

What do you mean? Nothing has changed.

In refferences log one of my issue tickets was ref to that PR. However I think that was some mistake.
So please ignore my question.

@kloczek
Copy link
Author

kloczek commented Jul 24, 2022

Just tested 5.1.0 and looks like now pytest produces result without failing units however there are still few warnings

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-5.1.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-5.1.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
libraries: Sphinx-5.1.0, docutils-0.18.1
base tempdir: /tmp/pytest-of-tkloczko/pytest-409
rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-5.1.0, configfile: setup.cfg, testpaths: tests
plugins: hypothesis-6.41.0, flaky-3.7.0
collected 1826 items

tests/test_api_translator.py ...........                                                                                                                             [  0%]
tests/test_application.py ........                                                                                                                                   [  1%]
tests/test_build.py ..........                                                                                                                                       [  1%]
tests/test_build_changes.py ..                                                                                                                                       [  1%]
tests/test_build_dirhtml.py .                                                                                                                                        [  1%]
tests/test_build_epub.py ..........s                                                                                                                                 [  2%]
tests/test_build_gettext.py ........                                                                                                                                 [  2%]
tests/test_build_html.py ........................................................................................................................................... [ 10%]
........................sssssssssssssssss........................................................................................................................... [ 19%]
.................................................................................................................................................................... [ 28%]
....................................................................................                                                                                 [ 32%]
tests/test_build_latex.py ssssss...................................................s.................s.......                                                        [ 37%]
tests/test_build_linkcheck.py ..............................                                                                                                         [ 39%]
tests/test_build_manpage.py ......                                                                                                                                   [ 39%]
tests/test_build_texinfo.py .........                                                                                                                                [ 39%]
tests/test_build_text.py ...............                                                                                                                             [ 40%]
tests/test_builder.py ..                                                                                                                                             [ 40%]
tests/test_catalogs.py ...                                                                                                                                           [ 41%]
tests/test_config.py .....................................                                                                                                           [ 43%]
tests/test_correct_year.py ...                                                                                                                                       [ 43%]
tests/test_directive_code.py .........................................                                                                                               [ 45%]
tests/test_directive_only.py .                                                                                                                                       [ 45%]
tests/test_directive_other.py .......                                                                                                                                [ 45%]
tests/test_directive_patch.py ...                                                                                                                                    [ 46%]
tests/test_docutilsconf.py ..                                                                                                                                        [ 46%]
tests/test_domain_c.py ..........................                                                                                                                    [ 47%]
tests/test_domain_cpp.py .................................                                                                                                           [ 49%]
tests/test_domain_js.py .........                                                                                                                                    [ 49%]
tests/test_domain_py.py .....................................................                                                                                        [ 52%]
tests/test_domain_rst.py ........                                                                                                                                    [ 53%]
tests/test_domain_std.py ...................                                                                                                                         [ 54%]
tests/test_environment.py ....                                                                                                                                       [ 54%]
tests/test_environment_indexentries.py ........                                                                                                                      [ 54%]
tests/test_environment_toctree.py .........                                                                                                                          [ 55%]
tests/test_errors.py ..                                                                                                                                              [ 55%]
tests/test_events.py ...                                                                                                                                             [ 55%]
tests/test_ext_apidoc.py .........................                                                                                                                   [ 57%]
tests/test_ext_autodoc.py ...................................................s.....s............                                                                     [ 60%]
tests/test_ext_autodoc_autoattribute.py ..............                                                                                                               [ 61%]
tests/test_ext_autodoc_autoclass.py ..................                                                                                                               [ 62%]
tests/test_ext_autodoc_autodata.py ........                                                                                                                          [ 63%]
tests/test_ext_autodoc_autofunction.py .............                                                                                                                 [ 63%]
tests/test_ext_autodoc_automodule.py ......                                                                                                                          [ 64%]
tests/test_ext_autodoc_autoproperty.py ...                                                                                                                           [ 64%]
tests/test_ext_autodoc_configs.py ................................                                                                                                   [ 66%]
tests/test_ext_autodoc_events.py ......                                                                                                                              [ 66%]
tests/test_ext_autodoc_mock.py .......                                                                                                                               [ 66%]
tests/test_ext_autodoc_preserve_defaults.py .                                                                                                                        [ 66%]
tests/test_ext_autodoc_private_members.py .....                                                                                                                      [ 67%]
tests/test_ext_autosectionlabel.py ...                                                                                                                               [ 67%]
tests/test_ext_autosummary.py ........................                                                                                                               [ 68%]
tests/test_ext_coverage.py ....                                                                                                                                      [ 68%]
tests/test_ext_doctest.py ......                                                                                                                                     [ 69%]
tests/test_ext_duration.py .                                                                                                                                         [ 69%]
tests/test_ext_extlinks.py ...                                                                                                                                       [ 69%]
tests/test_ext_githubpages.py ...                                                                                                                                    [ 69%]
tests/test_ext_graphviz.py .....                                                                                                                                     [ 69%]
tests/test_ext_ifconfig.py .                                                                                                                                         [ 69%]
tests/test_ext_inheritance_diagram.py ......                                                                                                                         [ 70%]
tests/test_ext_intersphinx.py ....................                                                                                                                   [ 71%]
tests/test_ext_math.py ss................                                                                                                                            [ 72%]
tests/test_ext_napoleon.py .................                                                                                                                         [ 73%]
tests/test_ext_napoleon_docstring.py ...................................................                                                                             [ 76%]
tests/test_ext_napoleon_iterators.py .................                                                                                                               [ 76%]
tests/test_ext_todo.py ...                                                                                                                                           [ 77%]
tests/test_ext_viewcode.py .....                                                                                                                                     [ 77%]
tests/test_extension.py .                                                                                                                                            [ 77%]
tests/test_highlighting.py .....                                                                                                                                     [ 77%]
tests/test_intl.py ....................................................                                                                                              [ 80%]
tests/test_locale.py ...                                                                                                                                             [ 80%]
tests/test_markup.py ....................................                                                                                                            [ 82%]
tests/test_metadata.py .                                                                                                                                             [ 82%]
tests/test_parser.py .                                                                                                                                               [ 82%]
tests/test_project.py ...                                                                                                                                            [ 82%]
tests/test_pycode.py .........                                                                                                                                       [ 83%]
tests/test_pycode_ast.py ..........................................                                                                                                  [ 85%]
tests/test_pycode_parser.py ............................                                                                                                             [ 87%]
tests/test_quickstart.py ..........                                                                                                                                  [ 87%]
tests/test_roles.py .                                                                                                                                                [ 87%]
tests/test_search.py ...........                                                                                                                                     [ 88%]
tests/test_setup_command.py .......                                                                                                                                  [ 88%]
tests/test_smartquotes.py ..........                                                                                                                                 [ 89%]
tests/test_templating.py ...                                                                                                                                         [ 89%]
tests/test_theming.py .......                                                                                                                                        [ 89%]
tests/test_toctree.py ...                                                                                                                                            [ 90%]
tests/test_transforms_post_transforms.py ....                                                                                                                        [ 90%]
tests/test_transforms_post_transforms_code.py ...                                                                                                                    [ 90%]
tests/test_util.py ........                                                                                                                                          [ 90%]
tests/test_util_docstrings.py ...                                                                                                                                    [ 91%]
tests/test_util_docutils.py ...                                                                                                                                      [ 91%]
tests/test_util_fileutil.py ..                                                                                                                                       [ 91%]
tests/test_util_i18n.py .......                                                                                                                                      [ 91%]
tests/test_util_images.py ....                                                                                                                                       [ 92%]
tests/test_util_inspect.py .........................................                                                                                                 [ 94%]
tests/test_util_inventory.py ...                                                                                                                                     [ 94%]
tests/test_util_logging.py ..................                                                                                                                        [ 95%]
tests/test_util_matching.py ...........                                                                                                                              [ 96%]
tests/test_util_nodes.py ..........................                                                                                                                  [ 97%]
tests/test_util_rst.py .......                                                                                                                                       [ 97%]
tests/test_util_template.py ..                                                                                                                                       [ 97%]
tests/test_util_typing.py .........ss....ss.......s..                                                                                                                [ 99%]
tests/test_versioning.py ..........                                                                                                                                  [ 99%]
tests/test_writer_latex.py .                                                                                                                                         [100%]

============================================================================= warnings summary =============================================================================
sphinx/ext/napoleon/iterators.py:9
  /home/tkloczko/rpmbuild/BUILD/sphinx-5.1.0/sphinx/ext/napoleon/iterators.py:9: RemovedInSphinx70Warning: sphinx.ext.napoleon.iterators is deprecated.
    warnings.warn('sphinx.ext.napoleon.iterators is deprecated.',

tests/test_build_linkcheck.py::test_auth_header_uses_first_match
  <frozen importlib._bootstrap>:187: ResourceWarning: unclosed <socket.socket [closed] fd=16, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

tests/test_build_linkcheck.py::test_linkcheck_allowed_redirects
  /usr/lib64/python3.8/logging/__init__.py:1559: ResourceWarning: unclosed <socket.socket [closed] fd=16, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
    for key in extra:
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

tests/test_build_linkcheck.py::test_invalid_ssl
  /usr/lib64/python3.8/os.py:675: ResourceWarning: unclosed <socket.socket [closed] fd=18, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
    raise KeyError(key) from None
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

tests/test_build_linkcheck.py::test_invalid_ssl
  /usr/lib64/python3.8/os.py:675: ResourceWarning: unclosed <socket.socket [closed] fd=16, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
    raise KeyError(key) from None
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

tests/test_build_linkcheck.py::test_linkcheck_exclude_documents
  /home/tkloczko/rpmbuild/BUILD/sphinx-5.1.0/sphinx/domains/__init__.py:206: ResourceWarning: unclosed <socket.socket [closed] fd=16, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
    self.object_types = dict(self.object_types)
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_build_epub.py:370: Skipped because DO_EPUBCHECK is not set
SKIPPED [17] tests/test_build_html.py:408: docutils-0.17 or below is required.
SKIPPED [6] tests/test_build_latex.py:83: not running latex, the required styles do not seem to be installed
SKIPPED [1] tests/test_build_latex.py:1153: not running latex, the required styles do not seem to be installed
SKIPPED [1] tests/test_build_latex.py:1539: not running latex, the required styles do not seem to be installed
SKIPPED [1] tests/test_ext_autodoc.py:2009: py39+ is required.
SKIPPED [1] tests/test_ext_autodoc.py:2157: cython is not installed
SKIPPED [1] tests/test_ext_math.py:31: LaTeX command "latex" is not available
SKIPPED [1] tests/test_ext_math.py:49: LaTeX command "latex" is not available
SKIPPED [1] tests/test_util_typing.py:187: python 3.9+ is required.
SKIPPED [1] tests/test_util_typing.py:197: python 3.10+ is required.
SKIPPED [1] tests/test_util_typing.py:293: python 3.9+ is required.
SKIPPED [1] tests/test_util_typing.py:320: python 3.9+ is required.
SKIPPED [1] tests/test_util_typing.py:466: python 3.10+ is required.
========================================================= 1791 passed, 35 skipped, 6 warnings in 125.07s (0:02:05) =========================================================

@AA-Turner
Copy link
Member

@kloczek what problem are you reporting? Warnings are just that, and not errors.

A

@kloczek
Copy link
Author

kloczek commented Jul 24, 2022

Using one module os deprecated and in other cases I thonk that still could be possoible top do something.

@AA-Turner AA-Turner added this to the some future version milestone Sep 29, 2022
@AA-Turner AA-Turner closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2024
@kloczek
Copy link
Author

kloczek commented Jan 18, 2024

So those warnings are legit? 🤔

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants