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

Tests failed with pandoc built without embed_data_files #278

Open
felixonmars opened this issue May 14, 2022 · 2 comments
Open

Tests failed with pandoc built without embed_data_files #278

felixonmars opened this issue May 14, 2022 · 2 comments

Comments

@felixonmars
Copy link
Contributor

According to jgm/pandoc#5045 pandoc built without embed_data_files won't be able to read its data file with sandbox enabled.

The option embed_data_files is defaulting to false: https://github.com/jgm/pandoc/blob/697aea371717f3dab5484227fcd8025bbd45c70b/pandoc.cabal#L415

This results in the following test failures:

======================================================================
ERROR: test_conversion_from_non_plain_text_file (tests.TestPypandoc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-pypandoc/src/pypandoc-1.7.4/tests.py", line 406, in test_conversion_from_non_plain_text_file
    received = pypandoc.convert_text('# some title\n', to='docx', format='md', outputfile=file_name)
  File "/build/python-pypandoc/src/pypandoc-1.7.4/pypandoc/__init__.py", line 113, in convert_text
    return _convert_input(source, format, 'string', to, extra_args=extra_args,
  File "/build/python-pypandoc/src/pypandoc-1.7.4/pypandoc/__init__.py", line 372, in _convert_input
    raise RuntimeError(
RuntimeError: Pandoc died with exitcode "97" during conversion: Could not find data file data/data/docx/[Content_Types].xml


======================================================================
ERROR: test_conversion_stderr (tests.TestPypandoc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-pypandoc/src/pypandoc-1.7.4/tests.py", line 327, in test_conversion_stderr
    with capture(pypandoc.convert_text,
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/build/python-pypandoc/src/pypandoc-1.7.4/tests.py", line 24, in capture
    command(*args, **kwargs)
  File "/build/python-pypandoc/src/pypandoc-1.7.4/pypandoc/__init__.py", line 113, in convert_text
    return _convert_input(source, format, 'string', to, extra_args=extra_args,
  File "/build/python-pypandoc/src/pypandoc-1.7.4/pypandoc/__init__.py", line 372, in _convert_input
    raise RuntimeError(
RuntimeError: Pandoc died with exitcode "97" during conversion: Could not find data file data/data/docx/[Content_Types].xml


======================================================================
ERROR: test_conversion_stderr_nullhandler (tests.TestPypandoc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-pypandoc/src/pypandoc-1.7.4/tests.py", line 353, in test_conversion_stderr_nullhandler
    with capture(pypandoc.convert_text,
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/build/python-pypandoc/src/pypandoc-1.7.4/tests.py", line 24, in capture
    command(*args, **kwargs)
  File "/build/python-pypandoc/src/pypandoc-1.7.4/pypandoc/__init__.py", line 113, in convert_text
    return _convert_input(source, format, 'string', to, extra_args=extra_args,
  File "/build/python-pypandoc/src/pypandoc-1.7.4/pypandoc/__init__.py", line 372, in _convert_input
    raise RuntimeError(
RuntimeError: Pandoc died with exitcode "97" during conversion: Could not find data file data/data/docx/[Content_Types].xml


----------------------------------------------------------------------
Ran 29 tests in 88.465s

FAILED (errors=3)
@JessicaTegner
Copy link
Owner

interesting. Was this introduced recently, cause as you can see, all tests seems to be passing on the CI?

@felixonmars
Copy link
Contributor Author

I guess the binary pypandoc downloads has the flag on to ease the usage. Unfortunately it's often not enabled in a distribution packaged pandoc.

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

No branches or pull requests

2 participants