You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an env-merge-info event handler raises an exception, instead of getting propagated to the user the exception is swallowed by parallel.py.
The "traceback" part of the output is:
Traceback
=========
File "/scratch/proj/sphinx/sphinx/util/parallel.py", line 126, in terminate
self._result_funcs.pop(tid)
KeyError: 0
Note that the full traceback is available in the log file. However, for most other exceptions, care is taken to display the user's most relevant traceback. Here's the full traceback from the log file:
Traceback
=========
Traceback (most recent call last):
File "/scratch/proj/sphinx/sphinx/events.py", line 404, in emit
results.append(listener.handler(self.app, *args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/proj/sphinx-dummy/source/conf.py", line 14, in oh_no
raise Exception('oh no!')
Exception: oh no!
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/scratch/proj/sphinx/sphinx/util/parallel.py", line 117, in join
if not self._join_one():
^^^^^^^^^^^^^^^^
File "/scratch/proj/sphinx/sphinx/util/parallel.py", line 140, in _join_one
self._result_funcs.pop(tid)(self._args.pop(tid), result)
File "/scratch/proj/sphinx/sphinx/builders/__init__.py", line 604, in merge
self.env.merge_info_from(docs, env, self.app)
File "/scratch/proj/sphinx/sphinx/environment/__init__.py", line 402, in merge_info_from
self.events.emit('env-merge-info', self, docnames, other)
File "/scratch/proj/sphinx/sphinx/events.py", line 415, in emit
raise ExtensionError(
sphinx.errors.ExtensionError: Handler <function setup.<locals>.oh_no at 0x7f63abe7e5c0> for event 'env-merge-info' threw an exception (exception: oh no!)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/scratch/proj/sphinx/sphinx/cmd/build.py", line 432, in build_main
app.build(args.force_all, args.filenames)
File "/scratch/proj/sphinx/sphinx/application.py", line 426, in build
self.builder.build_update()
File "/scratch/proj/sphinx/sphinx/builders/__init__.py", line 370, in build_update
self.build(
File "/scratch/proj/sphinx/sphinx/builders/__init__.py", line 398, in build
updated_docnames = set(self.read())
^^^^^^^^^^^
File "/scratch/proj/sphinx/sphinx/builders/__init__.py", line 512, in read
self._read_parallel(docnames, nproc=self.app.parallel)
File "/scratch/proj/sphinx/sphinx/builders/__init__.py", line 613, in _read_parallel
tasks.join()
File "/scratch/proj/sphinx/sphinx/util/parallel.py", line 121, in join
self.terminate()
File "/scratch/proj/sphinx/sphinx/util/parallel.py", line 126, in terminate
self._result_funcs.pop(tid)
KeyError: 0
How to Reproduce
Enable parallel builds (-j 2 or or more) and have more than one input doc. Then add to your conf.py:
Describe the bug
If an
env-merge-info
event handler raises an exception, instead of getting propagated to the user the exception is swallowed byparallel.py
.The "traceback" part of the output is:
Note that the full traceback is available in the log file. However, for most other exceptions, care is taken to display the user's most relevant traceback. Here's the full traceback from the log file:
How to Reproduce
Enable parallel builds (
-j 2
or or more) and have more than one input doc. Then add to yourconf.py
:Environment Information
Sphinx extensions
Additional context
No response
The text was updated successfully, but these errors were encountered: