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

PDF export unable to find downloaded Chromium binary #3316

Open
zodac opened this issue Sep 22, 2024 · 1 comment
Open

PDF export unable to find downloaded Chromium binary #3316

zodac opened this issue Sep 22, 2024 · 1 comment

Comments

@zodac
Copy link

zodac commented Sep 22, 2024

Tandoor Version

1.5.19

Setup

Docker / Docker-Compose

Reverse Proxy

Apache2

Other

No response

Bug description

I enabled the experimental PDF export option (as discussed in #3309), but when I attempt to export any recipe (single or all), it fails due to Chromium not being found. I can see in the logs that the binary seems to download, so I'm unsure why it's failing.

Not sure if there might be some permission issues? I'm using Docker on Windows, but don't have any volume mounts for the '/root/.local/share/' directory.

Relevant logs

[INFO] Starting Chromium download.
...
100%|██████████| 183M/183M [02:41<00:00, 1.13Mb/s]
[INFO] Beginning extraction
...
[INFO] Chromium extracted to: /root/.local/share/pyppeteer/local-chromium/1181205
Exception in thread Thread-2 (do_export):
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/recipes/cookbook/integration/integration.py", line 68, in do_export
    files = self.get_files_from_recipes(recipes, el, self.request.COOKIES)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/cookbook/integration/pdfexport.py", line 56, in get_files_from_recipes
    return asyncio.run(self.get_files_from_recipes_async(recipes, el, cookie))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/opt/recipes/cookbook/integration/pdfexport.py", line 18, in get_files_from_recipes_async
    browser = await launch(
              ^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/pyppeteer/launcher.py", line 307, in launch
    return await Launcher(options, **kwargs).launch()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/recipes/venv/lib/python3.12/site-packages/pyppeteer/launcher.py", line 148, in launch
    self.proc = subprocess.Popen(  # type: ignore
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/root/.local/share/pyppeteer/local-chromium/1181205/chrome-linux/chrome'
@vabene1111
Copy link
Collaborator

the PDF export is an experiemtal community feature that I do not offer support for, sorry. The exact issue you are having is one of the main reasons.

Community is welcome to fix this :)

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