Skip to content
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

DOC: Fix doc warning "Code input with no code" #26788

Closed
datapythonista opened this issue Jun 11, 2019 · 6 comments · Fixed by #26810
Closed

DOC: Fix doc warning "Code input with no code" #26788

datapythonista opened this issue Jun 11, 2019 · 6 comments · Fixed by #26810

Comments

@datapythonista
Copy link
Member

xref #24173

When building the documentation ./doc/make.py html, among other warnings we find the next:

/home/travis/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/IPython/sphinxext/ipython_directive.py:1020: UserWarning: Code input with no code at /home/travis/build/pandas-dev/pandas/doc/source/user_guide/advanced.rst, line 724
  warnings.warn(message)
/home/travis/miniconda3/envs/pandas-dev/lib/python3.6/site-packages/IPython/sphinxext/ipython_directive.py:1020: UserWarning: Code input with no code at /home/travis/build/pandas-dev/pandas/doc/source/user_guide/cookbook.rst, line 1300
  warnings.warn(message)

All code blocks seem to have code, so it's not obvious why we get the issues. Also, the reported lines aren't probably correct. We should research why this is failing, and fix the problem.

@thiviyanT
Copy link
Contributor

I'm on it 👍

@jorisvandenbossche
Copy link
Member

Also, the reported lines aren't probably correct. We should research why this is failing, and fix the problem.

You need to substract 15, then the number matches the line numbers in the rst files. That's because of the header that gets injected (something I mentioned at that point as annoying for the header approach, but I don't really have a good alternative)

@TomAugspurger
Copy link
Contributor

I noticed a couple had %timeit, not sure about all of them.

In a tiny example, %timeit worked OK (but maybe that was at the top of the input).

@jorisvandenbossche
Copy link
Member

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jun 11, 2019 via email

@jorisvandenbossche
Copy link
Member

BTW, the issue for the problem with the IPython directive is here: ipython/ipython#11362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants