1modm / petereport

PeTeReport is an open-source application vulnerability reporting tool.
https://1modm.github.io/petereport/
BSD 3-Clause "New" or "Revised" License
449 stars 131 forks source link

RuntimeError - Pandoc - Undefined control sequence #76

Closed mdowais closed 9 months ago

mdowais commented 11 months ago

Environment:

Request Method: GET Request URL: https://*******************/en/report/download/pdf/4

Django Version: 3.2.16 Python Version: 3.8.17 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'martor', 'django_bleach', 'preport'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, *callback_kwargs) File "/usr/local/lib/python3.8/dist-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view return view_func(request, args, **kwargs) File "/opt/petereport/app/preport/views.py", line 959, in reportdownloadpdf pypandoc.convert_text(final_markdown_output, to='pdf', outputfile=pdf_file_output, format='md', extra_args=['-H', PDF_HEADER_FILE, '--from', 'markdown+yaml_metadata_block+raw_html', '--template', PETEREPORT_LATEX_FILE, '--table-of-contents', '--toc-depth', '4', '--number-sections', '--highlight-style', 'breezedark', '--filter', 'pandoc-latex-environment', '--listings']) File "/usr/local/lib/python3.8/dist-packages/pypandoc/init.py", line 91, in convert_text return _convert_input(source, format, 'string', to, extra_args=extra_args, File "/usr/local/lib/python3.8/dist-packages/pypandoc/init.py", line 426, in _convert_input raise RuntimeError(

Exception Type: RuntimeError at /en/report/download/pdf/4 Exception Value: Pandoc died with exitcode "43" during conversion: Error producing PDF. ! Undefined control sequence. l.22445 the —\x

Any Idea??

1modm commented 10 months ago

Added mayor enhancements and contributions. Try to update from the repository git pull and try again.

If using docker:

git pull
docker compose build --build-arg TARGETARCH=amd64
docker-compose up