-
-
Notifications
You must be signed in to change notification settings - Fork 675
Open
Description
Steps To Reproduce
Following the advice from the developer's manual, I tried:
sage --docbuild reference html
Expected Behavior
The reference manual is build
Actual Behavior
Sage returns the following error:
Error building the documentation.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/cyril/src/sage-dev/src/sage_docbuild/__main__.py", line 534, in <module>
sys.exit(main())
^^^^^^
File "/home/cyril/src/sage-dev/src/sage_docbuild/__main__.py", line 524, in main
for dirpath, dirnames, filenames in os.walk(builder.dir, topdown=False):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen os>", line 348, in walk
TypeError: expected str, bytes or os.PathLike object, not partial
Note: incremental documentation builds sometimes cause spurious
error messages. To be certain that these are real errors, run
"make doc-clean doc-uninstall" first and try again.
Additional Information
The problem seems to come from the fact that builder.dir
is a partial function and cannot be accepted as argument of os.walk
. The fact that it is a partial function comes from the __getattr__
method of the class AllBuilder
in sage_docbuild/builders.py
.
If I am not mistaken, the use of builder.dir
comes from the following changes in PR #38185:
+ for dirpath, dirnames, filenames in os.walk(SAGE_DOC_SRC, topdown=False):
- for dirpath, dirnames, filenames in os.walk(builder.dir, topdown=False):
This piece of code is only executed when the command line parameter --no-prune-empty-dirs
is not used.
Environment
- OS: Debian
- Sage Version: 10.5.beta9
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide