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

autoclass not working, but no warnings or errors in log #4208

Closed
robmoss opened this issue Jun 8, 2018 · 10 comments · Fixed by #4250
Closed

autoclass not working, but no warnings or errors in log #4208

robmoss opened this issue Jun 8, 2018 · 10 comments · Fixed by #4250
Labels
Support Support question

Comments

@robmoss
Copy link

robmoss commented Jun 8, 2018

Details

Expected Result

When I build the documentation locally, I see:

epifx-docs-local

Actual Result

When it builds on RTD, the result is:

epifx-docs-rtd

The only error or warning in the build log is:

copying static files... WARNING: html_static_path entry '/home/docs/checkouts/readthedocs.org/readthedocs/templates/sphinx/_static' does not exist

So I have no idea what might be causing this.

@RichardLitt RichardLitt added the Bug A bug label Jun 8, 2018
@stsewd
Copy link
Member

stsewd commented Jun 8, 2018

I think you need to mark the option to install your project inside the virtualenv https://docs.readthedocs.io/en/latest/faq.html#can-i-document-a-python-package-that-is-not-at-the-root-of-my-repository

@stsewd stsewd added Support Support question and removed Bug A bug labels Jun 8, 2018
@robmoss
Copy link
Author

robmoss commented Jun 8, 2018

I've tried that, but installing the project in a virtual environment fails because it can't install scipy:

Running scipy-1.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-wlwgiltd/scipy-1.1.0/egg-dist-tmp-yp4yf4ya /tmp/easy_install-wlwgiltd/scipy-1.1.0/setup.py:375: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates warnings.warn("Unrecognized setuptools command, proceeding with " Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/epifx/envs/latest/lib/python3.5/site-packages/setuptools/sandbox.py", line 157, in save_modules yield saved File "/home/docs/checkouts/readthedocs.org/user_builds/epifx/envs/latest/lib/python3.5/site-packages/setuptools/sandbox.py", line 198, in setup_context yield File "/home/docs/checkouts/readthedocs.org/user_builds/epifx/envs/latest/lib/python3.5/site-packages/setuptools/sandbox.py", line 248, in run_setup DirectorySandbox(setup_dir).run(runner) File "/home/docs/checkouts/readthedocs.org/user_builds/epifx/envs/latest/lib/python3.5/site-packages/setuptools/sandbox.py", line 278, in run return func() File "/home/docs/checkouts/readthedocs.org/user_builds/epifx/envs/latest/lib/python3.5/site-packages/setuptools/sandbox.py", line 246, in runner _execfile(setup_script, ns) File "/home/docs/checkouts/readthedocs.org/user_builds/epifx/envs/latest/lib/python3.5/site-packages/setuptools/sandbox.py", line 47, in _execfile exec(code, globals, locals) File "/tmp/easy_install-wlwgiltd/scipy-1.1.0/setup.py", line 474, in <module> File "/tmp/easy_install-wlwgiltd/scipy-1.1.0/setup.py", line 450, in setup_package ImportError: No module named 'numpy'

@stsewd
Copy link
Member

stsewd commented Jun 8, 2018

I'm not sure about that, putting it the requirements.txt doesn't work? If it is for a C dependency, you can see https://docs.readthedocs.io/en/latest/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules

You may try conda too https://docs.readthedocs.io/en/latest/conda.html

@robmoss
Copy link
Author

robmoss commented Jun 8, 2018

Thanks, I'll try that out. I'm confused though, the documentation did build correctly until (somewhat) recently:

https://epifx.readthedocs.io/en/0.5.4/getting_started.html#forecast-summaries

Edit: the above version of the docs were built without installing into a virtual environment.

@robmoss
Copy link
Author

robmoss commented Jun 8, 2018

No, removing numpy and scipy from install_requires and installing into a virtualenv doesn't fix this, the autoclass content is still missing and there are no warnings or errors apart from static files one noted in my original report.

@robmoss
Copy link
Author

robmoss commented Jun 8, 2018

The last known-good build was on October 25, 2017:

https://readthedocs.org/projects/epifx/builds/6179336/

Since that build, the only changes to build/configuration files (such as setup.py and the Spinx configuration file) were to bump the version number from 0.5.5 to 0.5.6.

Edit: I managed to get the autoclass documentation to build correctly by setting "Sphinx==1.5.3" in my (RTD-specific) requirements.txt file. So this might be a Sphinx bug? Although the Sphinx issues that appear relevant (e.g., this one) have all been fixed in Sphinx 1.7.5, so I don't know why it only works on RTD with an older version of Sphinx.

Edit 2: The docs build fine with Sphinx 1.7.5 on my own machine. This issue appears to only affect classes that inherit from imports that are mocked on RTD, but when I uninstall the relevant packages in my local virtualenv, Sphinx 1.7.5 still produces the correct documentation. I'm thoroughly confused.

Edit 3: I misread the RTD build log. This is a bug present in Sphinx 1.7.4 (as used by RTD) and fixed in Sphinx 1.7.5. So until RTD updates to Sphinx 1.7.5, I need to use an older version of Sphinx without this bug, such as 1.5.3. Thanks for your patience and assistance!

@robmoss
Copy link
Author

robmoss commented Jun 15, 2018

Would you like me to close this bug report, since it's caused by a bug in Sphinx?

@stsewd
Copy link
Member

stsewd commented Jun 15, 2018

Thanks for finding the root of the problem, I think we can keep this open till we update the default Sphinx version, btw, you can pin to a recent version of Sphinx too.

@robmoss
Copy link
Author

robmoss commented Jun 15, 2018

No worries. And yes, good point about pinning a newer version of Sphinx.

@tuttelikz
Copy link

checking logs for warnings helped me: the reason was i didn't define one dependency in requirements file for pip

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

Successfully merging a pull request may close this issue.

4 participants