error: unrecognized arguments: -docbuild

171 views
Skip to first unread message

Trevor Karn

unread,
Aug 27, 2026, 3:36:24 PMAug 27
to sage-devel
Hi all,

I build the most recent version of Sage 10.10.beta9 using conda. I didn't explicitly turn off the doc build, so I expected it to build. However, when I call manual(), I am unable to bring up the documentation. The error message said to build it with `sage -docbuild reference html` and try again. When I tried that, I got an error: unrecognized arguments -docbuild. (Also with --docbuild.) 

So I have two questions - (1) what is the right thing to do here? and (2) more importantly, is the error message on line 1632 of SAGE_ROOT/src/sage/misc/sagedoc.py misleading? If so, how should it be changed?

Thanks!



(sage-dev) ~ $ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.10.beta9, Release Date: 2026-08-23             │
│ Using Python 3.12.13. Type "help()" for help.                      │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: manual()
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
Cell In[1], line 1
----> 1 manual()

File sage/misc/lazy_import.pyx:420, in sage.misc.lazy_import.LazyImport.__call__()
--> 420 'Could not get source, probably due dynamically evaluated source code.'

File ~/sage/sage/src/sage/misc/sagedoc.py:1659, in _sage_doc.reference(self)
   1650 def reference(self):
   1651     """
   1652     The Sage reference manual.
   1653
   (...)   1657         sage: manual()  # indirect doctest, not tested
   1658     """
-> 1659     self._open("reference")

File ~/sage/sage/src/sage/misc/sagedoc.py:1632, in _sage_doc._open(self, name, testing)
   1630         path = os.path.join(self._base_path, name, "index.html")
   1631         if not os.path.exists(path):
-> 1632             raise OSError("""The document '{0}' does not exist.  Please build it
   1633 with 'sage -docbuild {0} html' and try again.""".format(name))
   1635         if testing:
   1636             return (url, path)

OSError: The document 'reference' does not exist.  Please build it
with 'sage -docbuild reference html' and try again.
sage:                                                                          
(sage-dev) ~ $ sage -docbuild reference html
usage: sage [-h] [-v] [-q] [--simple-prompt] [-V] [-n [{jupyter,jupyterlab}]]
            [-c [COMMAND]]
            [file ...]
sage: error: unrecognized arguments: -docbuild

Michael Orlitzky

unread,
Aug 27, 2026, 6:13:21 PMAug 27
to 'Trevor Karn' via sage-devel
On 2026-08-27 12:36:24, 'Trevor Karn' via sage-devel wrote:
>
> So I have two questions - (1) what is the right thing to do here? and (2)
> more importantly, is the error message on line 1632 of
> SAGE_ROOT/src/sage/misc/sagedoc.py misleading? If so, how should it be
> changed?

There is a PR to update the relevant documentation,

https://github.com/sagemath/sage/pull/42646

though it looks like the error in sagedoc.py has been missed.

Dima Pasechnik

unread,
Aug 27, 2026, 6:21:24 PMAug 27
to sage-...@googlegroups.com
meson compile -C <build-dir> doc-html

should do it, for <build-dir> being the directory where Sage got installed.
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/47d17f43-a008-46d1-bbef-7a890ce0e85cn%40googlegroups.com.

Trevor Karn

unread,
Aug 31, 2026, 7:31:08 PMAug 31
to sage-...@googlegroups.com
Thanks, Dima. This is still not working for me. I ran the following:

rm -rf <build-dir>
meson setup <build-dir> --prefix="$CONDA_PREFIX"
meson compile -C <build-dir>
meson install -C <build-dir>

following output of gpt-4.1. I am able to open html files manually, but when I run "manual()" I get the same error as before. Do you have any further advice? I have attached the logs in case that is useful.

On Thu, Aug 27, 2026 at 5:21 PM Dima Pasechnik <dim...@gmail.com> wrote:
meson compile -C <build-dir> doc-html should do it, for <build-dir> being the directory where Sage got installed. On Thu, Aug 27, 2026 at 2: 36 PM 'Trevor Karn' via sage-devel <sage-devel@ googlegroups. com> wrote: > > Hi
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd
meson-log.txt
meson-setup.txt

Dima Pasechnik

unread,
Aug 31, 2026, 10:14:56 PMAug 31
to sage-...@googlegroups.com
it might be that "manual()" is just not working anymore, as happens with untested features.

The need for it is limited - just open the index file of the documentation in the browser...

Trevor Karn

unread,
Sep 1, 2026, 8:35:55 AMSep 1
to sage-...@googlegroups.com
Thanks, Dima. With my user hat on I'm happy to just open the index file of the documentation in the browser.

With my developer hat on, I'm thinking we should either fix `manual()` or remove it. Unless I am the only one with this problem. Has anyone else had this problem on the latest beta version?

On Mon, Aug 31, 2026 at 9:14 PM Dima Pasechnik <dim...@gmail.com> wrote:
it might be that "manual()" is just not working anymore, as happens with untested features. The need for it is limited - just open the index file of the documentation in the browser. . . On August 31, 2026 6: 30: 45 PM CDT, 'Trevor Karn' via sage-devel

To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.

Antonio Rojas

unread,
Sep 1, 2026, 10:07:59 AMSep 1
to sage-devel
manual() works just fine here in 10.10 beta 9. I installed the docs manually though, it may be `meson install` that is broken.

Kwankyu Lee

unread,
Sep 1, 2026, 11:03:37 PMSep 1
to sage-devel

Marc Culler

unread,
Sep 2, 2026, 2:29:24 PMSep 2
to sage-devel
The manual() funciton also works fine in the pre-release of the Sage_macOS binary package for Sage 10.10 on arm64.

- Marc

Trevor Karn

unread,
Sep 2, 2026, 3:02:20 PMSep 2
to sage-...@googlegroups.com
Ok - sounds like it is a me problem then. Thanks all!

On Wed, Sep 2, 2026 at 1:29 PM Marc Culler <marc....@gmail.com> wrote:
The manual() funciton also works fine in the pre-release of the Sage_macOS binary package for Sage 10. 10 on arm64. - Marc On Tuesday, September 1, 2026 at 9: 07: 59 AM UTC-5 Antonio Rojas wrote: manual() works just fine here in 10. 10 beta 9. I
Reply all
Reply to author
Forward
0 new messages