-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
doc generation fails on windows #5142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have seen this error when the local encoding is used (and it ascii). need to run the sphinx build with utf8 encoding enabled....not sure how to do that? |
@JanSchulz Can you post the output of import locale
print(locale.getlocale())
print(locale.getdefaultlocale()) Thanks. |
I have the same problem, and was also already discussed in the mailing list: |
closing this as not a bug |
just read the mailinglist discussion: pity :-( |
@JanSchulz I have a standard change to io.rst (remove the line with bytecode) in my |
An idea would be to add this to import os, io
_bad = "'word,length\nTr\xe4umen,7\nGr\xfc\xdfe,5'"
_good = "'word,length\nTraumen,7\nGruse,5'"
if os.name == 'nt':
with io.open("source/io.rst", 'rw', encoding='ascii') as f:
io_doc = f.read()
io_doc = io_doc.replace(_bad, _good)
f.write(io_doc)
# old stuff
if os.name == 'nt':
with io.open("source/io.rst", 'rw', encoding='ascii') as f:
io_doc = f.read()
io_doc = io_doc.replace(_good, _bad)
f.write(io_doc) |
@jorisvandenbossche @jreback Would you take such a addition to html() to make doc generation on windows working? |
@JanSchulz I would be interested, but I don't know if it could be included. However, the above code snippet is not working for me. |
I think the real cause of this bug is in https://github.com/pydata/pandas/blob/master/doc/sphinxext/ipython_directive.py#L356 Surounding that line with a On my windows, So changing that line to
will compile the docs for me. So if this is right, everybody who has @jorisvandenbossche: could you try this patch? On the other hand, the ipython_directive.py included with ipython has changed that line simple to Anyway: could someone reopen this bug so that it can be fixed properly? @jreback |
@JanSchulz It does work for me on windows (the About the duplicated copy, I opened an issue recently: #5221. |
It worked when I replaced the embedded copy with the normal IPython installed one (simple add So what's better: replacing the embedded copy (if it works for the rest as well) or just adding the above fix (if that works for all)? |
And you didn't get other warnings because of using IPython's own sphinxext? (then that would already go a long way to solving #5221 for |
There were lots of warnings, but there were already lots of warnings when the embedded extension was used. The api doc seemed to be ok... I will have a look into the diff of iypthon_directive (between the current one from pandas and the current one in ipython) and will have a look if something should be upstreamed. |
How is this coming? I think the better option would be to go with IPython's own sphinxext, but that may be some more work. So maybe your fix could be a quick temporary fix to at least fix the doc building on windows for now? |
I think the problem is actually numpydoc (ie that it's producing a malformed table) . But we could follow this SO answer and prevent the building of any method called 'flags' |
@jorisvandenbossche , are we good here now? |
yes, I was also thinking this could be closed. It's not fixed as such, as the created output on Windows is not 'nice', but the actual issue here ('the building of the docs that fails') is solved. So I think we can say: closed by #5925 |
you have awesome collab powers @jorisvandenbossche, use them! |
hmm, @y-p and you can sometimes write such cryptic messages :-) |
What I meant is: you can and should exercise your collab privileges, such as closing |
ok! |
The doc generation failed under windows due to problems with sphinx and encoded umlauts in code (see links in pandas-dev/pandas#5142). The workaround is to replace the offending text with one which does not fail (but which makes the example a bit pointless), build the docs and restore the old text.
The problem is the following line in io.rst:
The text was updated successfully, but these errors were encountered: