1modm / petereport

PeTeReport is an open-source application vulnerability reporting tool.

Home Page:https://1modm.github.io/petereport/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RuntimeError - Pandoc - Undefined control sequence

mdowais opened this issue · comments

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??

commented

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