"TypeError: first argument must be callable" when running "mach doc --format text"
Categories
(Developer Infrastructure :: Source Documentation, defect)
Tracking
(firefox112 fixed)
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: marco, Assigned: ogiorgis)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 1 obsolete file)
Traceback (most recent call last):
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/sphinx/cmd/build.py", line 280, in build_main
app.build(args.force_all, filenames)
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/sphinx/application.py", line 344, in build
self.builder.build_update()
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 294, in build_update
self.build(to_build,
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 358, in build
self.write(docnames, list(updated_docnames), method)
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 529, in write
self._write_parallel(sorted(docnames),
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 556, in _write_parallel
self.write_doc(firstname, doctree)
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/sphinx/builders/text.py", line 70, in write_doc
self.writer.write(doctree, destination)
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/docutils/writers/__init__.py", line 78, in write
self.translate()
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/sphinx/writers/text.py", line 377, in translate
visitor = self.builder.create_translator(self.document, self.builder)
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 128, in create_translator
return self.app.registry.create_translator(self, *args)
File "/home/marco/FD/mozilla-unified/obj-x86_64-pc-linux-gnu/_virtualenvs/docs/lib/python3.10/site-packages/sphinx/registry.py", line 346, in create_translator
setattr(translator, 'visit_' + name, MethodType(visit, translator))
TypeError: first argument must be callable
Comment 1•1 year ago
|
||
The severity field is not set for this bug.
:Sylvestre, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•1 year ago
|
Comment 2•1 year ago
|
||
We should either:
- support the txt export
- trigger an error
Marco told me he needs it ML learning
There are 2 extensions that are problematic:
- mozbuild.sphinx:
The line 252 of mozbuild/sphinx.py (app.srcdir = manager.staging_dir)
I don't know yet what this line is for but it triggers the error - sphinx_panels
The bug is known but this extension is no longer maintained.
https://github.com/sphinx-doc/sphinx/issues/10003
We need to migrate to sphinx-design (which seems to have solved the problem)
https://github.com/executablebooks/sphinx-design/issues/54
Comment 4•1 year ago
|
||
Yeah, for sphinx design, I opened: https://bugzilla.mozilla.org/show_bug.cgi?id=1808026
but we have a dependency issue in python between our vendored libs and pip ...
sphinx design requires a more recent version of sphinx which conflicts with importlib metadata or something :)
I suspect it's not that simple.
I will already see the problem with mozbuild.sphinx then I will take a look at sphinx-design
The problem for mozbuild.sphinx is the nested table in the file security/nss/doc/rst/legacy/jss/jss_provider_notes/index.rst .
If we drop (or fix :) ) this table, mozbuild.sphinx does not raise the error.
This table is anyway not rendered correctly in html
https://firefox-source-docs.mozilla.org/security/nss/legacy/jss/jss_provider_notes/index.html#what-s-not-supported
These tables are not taken into account by sphinx, appear badly in
html and trigger a problem when you want to build the doc in text
mode.
Updated•1 year ago
|
Assignee | ||
Comment 10•1 year ago
|
||
Moreover it fixes the behavior of the right menu.
Depends on D170178
Comment 11•1 year ago
|
||
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/317d08812946 fix title lenght in doc r=firefox-source-docs-reviewers,sylvestre DONTBUILD
Comment 12•1 year ago
|
||
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e5ceb5526b06 remove circular reference warnings r=firefox-source-docs-reviewers,sylvestre DONTBUILD
Comment 13•1 year ago
|
||
bugherder |
Reporter | ||
Comment 14•1 year ago
|
||
This is still failing for me.
Updated•1 year ago
|
Assignee | ||
Comment 15•1 year ago
|
||
Yes, I fixed the first problem here: https://phabricator.services.mozilla.com/D168766 (But the fix is only here https://hg.mozilla.org/projects/nss/ repository for the moment).
And the second point depends on https://bugzilla.mozilla.org/show_bug.cgi?id=1808026 which is not resolved yet.
Comment 16•1 year ago
|
||
Assignee | ||
Comment 17•1 year ago
|
||
Comment 18•1 year ago
|
||
Comment on attachment 9322667 [details]
Bug 1810702 - Fix incorrect pygment style r=#firefox-source-docs-reviewers,sylvestre
Revision D172398 was moved to bug 1821997. Setting attachment 9322667 [details] to obsolete.
Reporter | ||
Updated•1 year ago
|
Updated•7 months ago
|
Description
•