Skip to content

Conversation

@datapythonista
Copy link
Member

When the doc build fails, we still try to create the redirected pages, which fails, and adds to the log a misleading error (it looks in the logs like the problem is not the original error but that something is failing in the redirects).

See for example https://travis-ci.org/pandas-dev/pandas/jobs/542714631:

Recursion error: maximum recursion depth exceeded while calling a Python object This can happen with very large or deeply nested source files. You can carefully increase the default Python recursion limit of 1000 in conf.py with e.g.: import sys; sys.setrecursionlimit(1500) Traceback (most recent call last): File "./make.py", line 341, in <module> sys.exit(main()) File "./make.py", line 337, in main return getattr(builder, args.command)() File "./make.py", line 226, in html self._add_redirects() File "./make.py", line 209, in _add_redirects with open(path, 'w') as moved_page_fd: FileNotFoundError: [Errno 2] No such file or directory: '/home/travis/build/pandas-dev/pandas/doc/build/html/generated/pandas.api.extensions.ExtensionArray.argsort.html' 

Here I make the redirects be created only if the doc build succeeded. Also opening the browser if we're building a single page.

@datapythonista datapythonista added Docs CI Continuous Integration labels Jun 9, 2019
@codecov
Copy link

codecov bot commented Jun 9, 2019

Codecov Report

Merging #26752 into master will decrease coverage by 1.41%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #26752 +/- ## ========================================== - Coverage 91.7% 90.29% -1.42%  ========================================== Files 179 179 Lines 50767 50767 ========================================== - Hits 46555 45839 -716  - Misses 4212 4928 +716
Flag Coverage Δ
#multiple 90.29% <ø> (ø) ⬆️
#single ?
Impacted Files Coverage Δ
pandas/core/computation/pytables.py 62.5% <0%> (-27.75%) ⬇️
pandas/io/pytables.py 63.82% <0%> (-26.48%) ⬇️
pandas/io/gbq.py 78.94% <0%> (-10.53%) ⬇️
pandas/core/computation/common.py 84.21% <0%> (-5.27%) ⬇️
pandas/core/computation/expr.py 94.5% <0%> (-3.03%) ⬇️
pandas/io/clipboard/clipboards.py 31.88% <0%> (-2.9%) ⬇️
pandas/io/formats/printing.py 84.49% <0%> (-1.07%) ⬇️
pandas/core/indexes/datetimes.py 96.21% <0%> (-0.17%) ⬇️
pandas/core/arrays/categorical.py 95.8% <0%> (-0.13%) ⬇️
pandas/core/frame.py 96.88% <0%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7748ca...ab4af39. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jun 9, 2019

Codecov Report

Merging #26752 into master will decrease coverage by 1.41%.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #26752 +/- ## ========================================== - Coverage 91.7% 90.29% -1.42%  ========================================== Files 179 179 Lines 50767 50767 ========================================== - Hits 46555 45839 -716  - Misses 4212 4928 +716
Flag Coverage Δ
#multiple 90.29% <ø> (ø) ⬆️
#single ?
Impacted Files Coverage Δ
pandas/core/computation/pytables.py 62.5% <0%> (-27.75%) ⬇️
pandas/io/pytables.py 63.82% <0%> (-26.48%) ⬇️
pandas/io/gbq.py 78.94% <0%> (-10.53%) ⬇️
pandas/core/computation/common.py 84.21% <0%> (-5.27%) ⬇️
pandas/core/computation/expr.py 94.5% <0%> (-3.03%) ⬇️
pandas/io/clipboard/clipboards.py 31.88% <0%> (-2.9%) ⬇️
pandas/io/formats/printing.py 84.49% <0%> (-1.07%) ⬇️
pandas/core/indexes/datetimes.py 96.21% <0%> (-0.17%) ⬇️
pandas/core/arrays/categorical.py 95.8% <0%> (-0.13%) ⬇️
pandas/core/frame.py 96.88% <0%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7748ca...ab4af39. Read the comment docs.

@WillAyd
Copy link
Member

WillAyd commented Jun 9, 2019

Did this error just pop up with a new version of sphinx?

@datapythonista
Copy link
Member Author

Yep, the error was fixed in #26727. This PR is just for future failures of the doc build, to not include the misleading redirects error.

self._open_browser(self.single_doc_html)
else:
self._add_redirects()
if ret_code == 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we already have a good error message to the user if the build fails?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we'll have the sphinx error message. In the example in the description, the end of the log will be:

Recursion error: maximum recursion depth exceeded while calling a Python object This can happen with very large or deeply nested source files. You can carefully increase the default Python recursion limit of 1000 in conf.py with e.g.: import sys; sys.setrecursionlimit(1500) 
@jreback jreback merged commit f8225bc into pandas-dev:master Jun 9, 2019
@jreback
Copy link
Contributor

jreback commented Jun 9, 2019

@jreback jreback added this to the 0.25.0 milestone Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration Docs

4 participants