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

Aggregate files not found when processing overly large projects #51

Open
nbanyan opened this issue Nov 13, 2024 · 0 comments
Open

Aggregate files not found when processing overly large projects #51

nbanyan opened this issue Nov 13, 2024 · 0 comments

Comments

@nbanyan
Copy link

nbanyan commented Nov 13, 2024

Unfortunately, this may be hard to replicate with a fabricated example. One of my MkDocs projects is very large (trying to print the entire thing with another program put it at over PDF 1800 pages). With that project, I get the following error where it looks like the temporary directory or files are expiring before aggregation can complete.

Traceback (most recent call last):
  File "/Users/training4/venv3.9/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/mkdocs/__main__.py", line 268, in serve_command
    serve.serve(**kwargs)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 85, in serve
    builder(config)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 67, in builder
    build(config, serve_url=None if is_clean else serve_url, dirty=is_dirty)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/mkdocs/commands/build.py", line 347, in build
    config.plugins.on_post_build(config=config)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/mkdocs/plugins.py", line 602, in on_post_build
    return self.run_event('post_build', config=config)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/mkdocs/plugins.py", line 568, in run_event
    result = method(**kwargs)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/mkdocs_exporter/formats/pdf/plugin.py", line 190, in _on_post_build_2
    self.aggregator.append(page.formats['pdf']['path'] + '.aggregate')
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/mkdocs_exporter/formats/pdf/aggregator.py", line 90, in append
    self.writer.append(document)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/pypdf/_writer.py", line 2638, in append
    self.merge(
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/pypdf/_writer.py", line 2688, in merge
    stream, encryption_obj = self._create_stream(fileobj)
  File "/Users/training4/venv3.9/lib/python3.9/site-packages/pypdf/_writer.py", line 2555, in _create_stream
    with FileIO(fileobj, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/ry/06xwpwrn3cvgmlgm77pbdd9h0000gp/T/mkdocs_tg3gc1b3/content_category_54/file_name.pdf.aggregate'
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

1 participant