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

Failure during GitHub build #35

Closed
phreed opened this issue Mar 22, 2024 · 2 comments
Closed

Failure during GitHub build #35

phreed opened this issue Mar 22, 2024 · 2 comments

Comments

@phreed
Copy link
Contributor

phreed commented Mar 22, 2024

While running a Run mkdocs gh-deploy --force in a GitHub action I got the following error.

Traceback (most recent call last):
PDF export is disabled (set environment variable ENABLE_PDF_EXPORT to 1 to enable)
root dir: /home/runner/work/FreeTAKServer-User-Docs/FreeTAKServer-User-Docs/docs/diagrams, src dir: /home/runner/work/FreeTAKServer-User-Docs/FreeTAKServer-User-Docs/docs/diagrams/src
Could not find include [Errno 2] No such file or directory: '/home/runner/work/FreeTAKServer-User-Docs/FreeTAKServer-User-Docs/docs/diagrams/src/osaPuml/Common.puml'[Errno 2] No such file or directory: '/home/runner/work/FreeTAKServer-User-Docs/FreeTAKServer-User-Docs/docs/diagrams/osaPuml/Common.puml'
  File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/mkdocs_build_plantuml_plugin/plantuml.py", line 275, in _readIncludeLine
    temp_file = self._read_incl_line_file(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/site-packages/mkdocs_build_plantuml_plugin/plantuml.py", line 303, in _read_incl_line_file
    with open(inc_file_abs, "r") as inc:
         ^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/FreeTAKServer-User-Docs/FreeTAKServer-User-Docs/docs/diagrams/src/osaPuml/Common.puml'

The mkdocs.yml is equipped with the following plugin configuration:


  - build_plantuml:
      render: 'server'
      bin_path: "/usr/local/bin/plantuml"
      server: 'https://www.plantuml.com/plantuml'
      disable_ssl_certificate_validation: true
      output_format: 'svg'
      allow_multiple_roots: false
      diagram_root: 'docs/diagrams'
      output_folder: 'gen'
      input_folder: 'src'
      input_extensions: ''
      

It seems to me that the plugin is looking for a local osaPuml/Common.puml.
When I load the puml files into 'https://www.plantuml.com/plantuml' manually they generate svg files correctly.

This is for an open source project FreeTAKServer.
https://github.com/babeloff/FreeTAKServer-User-Docs/actions/runs/8383303790/job/22958758554

@phreed
Copy link
Contributor Author

phreed commented Mar 22, 2024

I found the problem.
It is mostly a me error but I think the documentation could be improved.

It was not clear that httplib2 needed to installed by pip.
The default input_extensions is blank, I presumed changing the suffix on a puml file would prevent it from being processed.
A file other than those I was expecting to be processed was picked up and it had an !include bug.

I am working on a fork that improves these things.
Expect a pull request soon.

@phreed phreed mentioned this issue Mar 22, 2024
christo-ph added a commit that referenced this issue Mar 22, 2024
@christo-ph
Copy link
Collaborator

Thank you for your contribution, very welcome. I released 1.10 with your PR.

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