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
{{ message }}
Repository navigation
DOC Sphinx linkcheck may not work as expected as there are broken links on scikit-learn #34319
changed the title [-]DOC Broken links on scikit-learn website[/-][+]DOC Sphinx `linkcheck` may not work as expected as there are broken links on scikit-learn [/+]on Jun 17, 2026
So if we run make linkcheck manually from time to time, we wouldn't catch all the failing links? Do we want to keep doing the manual check from time to time or would it be easy to fix? See #25024 for reference, since this is a great first time contributor issue.
So if we run make linkcheck manually from time to time, we wouldn't catch all the failing links?
Right, we don't catch all the broken links. There are some links listed in doc.conf.py that are supposed to be skipped, but the ones I found are different.
Do we want to keep doing the manual check from time to time or would it be easy to fix?
I believe that there is nothing to fix; linkcheck is a built-in "Sphinx builder".
I just tried running make linkcheck again, and my laptop got super hot. I'm not sure I want to run it again. :-/
The first time I let it run until the end, it didn't find the links I initially reported (e.g., to probabl and to the calendar).
So, I think we need a different way to check for broken links.
make linkcheck is probably not perfect but good enough I would say. There may be some reasons why it didn't catch some of the links you pointed to, for example the probabl link is in an html template template/funding_links.html and maybe linkcheck only handles rst not entirerly sure ...
To clear up some possible confusion, make linkcheck is run manually indeed from time to time (every few years?). In the meantime, people do open issues about broken links they bump into from time to time and we fix them.
Although not ideal I think this is fine sticking to this manual approach. In other words, I don't think it is worth it trying to come up with an automated way of creating issues for each problematic links.
One potential reason make linkcheck takes time, is likely because make linkcheck runs the full examples.
If you find a better tool that linkcheck why not but at the same time, I am not sure this is super high priority ...
A few advantages of make linkcheck:
we already have some ignore list where some links are fine but reported as broken (false positives), for example because the website blocks some automated requests
it knows about rst and reports the issue in terms of the rst source.
Activity
AnneBeyer commentedon Jun 17, 2026
Thank you for checking, @DeaMariaLeon! I don't think fixing broken links even needs an issue. :)
Especially the probabl one should be fixed asap!
DeaMariaLeon commentedon Jun 17, 2026
Thanks for letting me know @AnneBeyer. Maybe I should change the title of the issue because my question/concern is:
The link can be easily fixed (and asap like you say).
[-]DOC Broken links on scikit-learn website[/-][+]DOC Sphinx `linkcheck` may not work as expected as there are broken links on scikit-learn [/+]MarieSacksick commentedon Jul 2, 2026
https://www.probabl.ai/lp/scikit-learn/ is back online. Sorry for the trouble.
StefanieSenger commentedon Jul 6, 2026
So if we run
make linkcheckmanually from time to time, we wouldn't catch all the failing links? Do we want to keep doing the manual check from time to time or would it be easy to fix? See #25024 for reference, since this is a great first time contributor issue.DeaMariaLeon commentedon Jul 6, 2026
Right, we don't catch all the broken links. There are some links listed in
doc.conf.pythat are supposed to be skipped, but the ones I found are different.I believe that there is nothing to fix;
linkcheckis a built-in "Sphinx builder".I just tried running
make linkcheckagain, and my laptop got super hot. I'm not sure I want to run it again. :-/The first time I let it run until the end, it didn't find the links I initially reported (e.g., to probabl and to the calendar).
So, I think we need a different way to check for broken links.
DeaMariaLeon commentedon Jul 7, 2026
FYI I'm locally testing an action: https://github.com/lycheeverse/lychee-action.
I'll let you know what I find
DeaMariaLeon commentedon Jul 8, 2026
Findings and recap:
linkcheckis not run in the CI and it misses broken linkslycheehas a GitHub Action, but I was able to run it locally with Docker:To use it, I first built the documentation with
make html-noplot.Then:
Found broken links:
[/docs/auto_examples/covariance/plot_mahalanobis_distances.html]:
[404] http://web.ipac.caltech.edu/staff/fmasci/home/astro_refs/LeastMedianOfSquares.pdf (at 1057:57) | Rejected status code: 404 Not Found | Followed 1 redirect. Redirects: http://web.ipac.caltech.edu/staff/fmasci/home/astro_refs/LeastMedianOfSquares.pdf --[301]--> https://web.ipac.caltech.edu/staff/fmasci/home/astro_refs/LeastMedianOfSquares.pdf
[/docs/institutional_support.html]:
[302] https://aphp.fr/ (at 702:40) | Rejected status code: 302 Found
[404] https://cds.nyu.edu/mooresloan/ (at 725:40) | Rejected status code: 404 Not Found
[ERROR] https://digicosme.lri.fr/ (at 732:40) | Connection failed. Check network connectivity and firewall settings
[/docs/modules/ensemble.html]:
[TIMEOUT] http://csiss.ncgia.ucsb.edu/SPACE/workshops/2004/SAC/files/fisher.pdf (at 1137:61) | Request timed out
[ERROR] https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=48caac2f65bce47f6d27400ae4f60d8395cec2f3 (at 1525:63) | SSL certificate not trusted. Use --insecure if site is trusted
[/docs/modules/decomposition.html]:
[404] https://people.eecs.berkeley.edu/~wainwrig/stat241b/scholkopf_kernel.pdf (at 939:37) | Rejected status code: 404 Not Found
[/docs/modules/feature_selection.html]:
[404] http://users.isr.ist.utl.pt/~aguiar/CS_notes.pdf (at 908:37) | Rejected status code: 404 Not Found
[ERROR] https://citeseerx.ist.psu.edu/doc_view/pid/5fedabbb3957bbb442802e012d829ee0629a01b6 (at 982:74) | SSL certificate not trusted. Use --insecure if site is trusted
This is the report that was created (hence better flags needed)
broken_links_report.txt
So, we need to decide if using this library is an option. Also, if I open a "good first issue" to fix the links.
lesteve commentedon Aug 3, 2026
make linkcheckis probably not perfect but good enough I would say. There may be some reasons why it didn't catch some of the links you pointed to, for example the probabl link is in an html templatetemplate/funding_links.htmland maybelinkcheckonly handlesrstnot entirerly sure ...To clear up some possible confusion,
make linkcheckis run manually indeed from time to time (every few years?). In the meantime, people do open issues about broken links they bump into from time to time and we fix them.Although not ideal I think this is fine sticking to this manual approach. In other words, I don't think it is worth it trying to come up with an automated way of creating issues for each problematic links.
One potential reason
make linkchecktakes time, is likely becausemake linkcheckruns the full examples.If you find a better tool that
linkcheckwhy not but at the same time, I am not sure this is super high priority ...A few advantages of
make linkcheck:In the past what happened is:
make linkchecklocallyHere is a hacky script I found in my notes to generate part of the content of the issue.
I think I had a script to update automatically the issue when PR were created and merged, not sure where it is, but it was something like https://gist.github.com/lesteve/478d52599d394ec5e7f56dbf0827a5e9 based on a previous script by Thomas Pfan.
DeaMariaLeon commentedon Aug 3, 2026
Everything you comment here I already knew. But:
lychee, like I had written earlier.lycheeis easy to run in aDockercontainer (I shared what I did above as well).I corrected the broken links and the problem is solved as far as I'm concerned.