boschglobal / doxysphinx

A lightweight Doxygen extension for Sphinx
https://boschglobal.github.io/doxysphinx/
MIT License
12 stars 11 forks source link

doxysphinx 3.3.10 failure with Doxygen 1.12.0 #151

Open winterz opened 3 weeks ago

winterz commented 3 weeks ago

Describe the bug Since yesterday when I installed doxygen v1.12.0 I'm seeing these errors. I'm making an educated guess that doxysphinx is non-compatible in some way. something about doxygen_blank.html maybe?

doxysphinx v3.3.10
starting build command...
copied 23119 resource-files to /build/docs/sphinx/doxygen/html
Exception: Exception occurred in Worker-4 with the following arguments:
Arg 0: PosixPath('/build/docs/mixedout/sphinx/docs/doxygen/html/doxygen_blank.html')
Arg 1: 'd9ea1c0f74c7554a52a2ce2561aac3055142295ca36fea61f337d72273343dfed6705d92d33b93b66db57b4d634a47b044e6cbde612d71df3012e20b366b1212'
Traceback (most recent call last):
  File "/build/bin/Python39/dev-packages/mpire/worker.py", line 482, in _run_safely
    results = func()
  File "/build/bin/Python39/dev-packages/mpire/worker.py", line 417, in _func
    _results = func(*args) if self.is_apply_func else func(args)
  File "/build/bin/Python39/dev-packages/mpire/worker.py", line 591, in _helper_func_with_idx
    return args[0], self._call_func(func, args[1])
  File "/build/bin/Python39/dev-packages/mpire/worker.py", line 616, in _call_func
    return func(*args, **kwargs)
  File "/build/bin/Python39/dev-packages/doxysphinx/process.py", line 157, in _run
    parse_result = parser.parse(html_file)
  File "/build/bin/Python39/dev-packages/doxysphinx/html_parser.py", line 490, in parse
    meta_title, project, title = self._read_project_and_title(buffer, file)
  File "/build/bin/Python39/dev-packages/doxysphinx/html_parser.py", line 506, in _read_project_and_title
    first, *_, last = meta_title.split(":")
ValueError: not enough values to unpack (expected at least 2, got 1)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/build/bin/Python39/dev-packages/bin/doxysphinx", line 8, in <module>
    sys.exit(cli())
  File "/build/bin/Python39/dev-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/build/bin/Python39/dev-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/build/bin/Python39/dev-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/build/bin/Python39/dev-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/build/bin/Python39/dev-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/build/bin/Python39/dev-packages/doxysphinx/cli.py", line 135, in build
    builder.build(doxy_output)
  File "/build/bin/Python39/dev-packages/doxysphinx/process.py", line 92, in build
    created_rsts = self._build(doxygen_html_dir)
  File "/build/bin/Python39/dev-packages/doxysphinx/process.py", line 105, in _build
    result = pool.map(self._run, files_with_hashes)
  File "/build/bin/Python39/dev-packages/mpire/pool.py", line 467, in map
    results = self.map_unordered(
  File "/build/bin/Python39/dev-packages/mpire/pool.py", line 534, in map_unordered
    return list(self.imap_unordered(func, iterable_of_args, iterable_len, max_tasks_active, chunk_size,
  File "/build/bin/Python39/dev-packages/mpire/pool.py", line 788, in imap_unordered
    self._handle_exception()
  File "/build/bin/Python39/dev-packages/mpire/pool.py", line 926, in _handle_exception
    raise exception
ValueError: not enough values to unpack (expected at least 2, got 1)
aniketsalve22 commented 3 weeks ago

Hi Allen, Thank you for creating the issue. My first guess would be that may be newer doxygen is creating HTML file which has different format. We have seen this in past with some other HTML files for version 11 which is fixed in this PR 141

But we will take a deeper look into it and fix it soon.

winterz commented 3 weeks ago

using the solution to #141 as inspiration I can verify that this little patch to process.py seems to fix (hackish, maybe):

       for html_file in doxygen_html_dir.glob("*.html"):
            # For Doxygen>=1.10.0 this file can be skipped
            if html_file.name == "doxygen_crawl.html":
                continue
            # For Doxygen>=1.12.0 this file can be skipped
            if html_file.name == "doxygen_blank.html":
                continue
winterz commented 3 weeks ago

any chance you can prioritize a release with the fix for this one?

aniketsalve22 commented 1 week ago

Hi @winterz , can you please provide bit more details about your development environment. I tried locally with doxygen 1.12.0 and was successfully able to build with doxysphinx. The extra html file was created with name as "doxygen_crawl.html"

winterz commented 1 week ago

looking in the doxygen 1.12.0 source code I see the file src/qhp.cpp uses a "doxygen_blank" file. indeed we are generating qhp (i.e. GENERATE_QHP=YES). this may be a major pain for you to test since it requires Qt's qhelpgenerator and stuff

I can test here by unsetting GENERATE_QHP to see if that helps

winterz commented 1 week ago

I can verify that "doxygen_blank.html" is no longer generated when GENERATE_QHP is unset.

let me know if you need help installing qhelpgenerator for testing (On Fedora I use dnf install qt5-doctools and set QHG_LOCATION="qhelpgenerator-5")