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

Weird build errors ("contents.doctree" doesn't exist) #1240

Closed
pitrou opened this issue Apr 29, 2015 · 4 comments
Closed

Weird build errors ("contents.doctree" doesn't exist) #1240

pitrou opened this issue Apr 29, 2015 · 4 comments

Comments

@pitrou
Copy link

pitrou commented Apr 29, 2015

In my project, I had to disable the "setup.py install" step because it would entail a C++ compilation step that's not possible on the readthedocs server (I did this by calling sys.exit() when the READTHEDOCS env var is set).

Then I get build errors every time a html build is submitted:

html
-----

/var/build/user_builds/llvmlite/checkouts/latest/docs/source/index.rst:5: WARNING: toctree contains reference to nonexisting document u'source/developer/index'
WARNING: master file /var/build/user_builds/llvmlite/checkouts/latest/docs/contents.rst not found
/var/build/user_builds/llvmlite/checkouts/latest/docs/source/index.rst:: WARNING: document isn't included in any toctree

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/llvmlite/envs/latest/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 254, in main
    app.build(force_all, filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/llvmlite/envs/latest/local/lib/python2.7/site-packages/sphinx/application.py", line 212, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/llvmlite/envs/latest/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 214, in build_update
    'out of date' % len(to_build))
  File "/home/docs/checkouts/readthedocs.org/user_builds/llvmlite/envs/latest/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 276, in build
    self.write(docnames, list(updated_docnames), method)
  File "/home/docs/checkouts/readthedocs.org/user_builds/llvmlite/envs/latest/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 320, in write
    self._write_serial(sorted(docnames), warnings)
  File "/home/docs/checkouts/readthedocs.org/user_builds/llvmlite/envs/latest/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 331, in _write_serial
    doctree = self.env.get_and_resolve_doctree(docname, self)
  File "/home/docs/checkouts/readthedocs.org/user_builds/llvmlite/envs/latest/local/lib/python2.7/site-packages/sphinx/environment.py", line 1110, in get_and_resolve_doctree
    doctree = self.get_doctree(docname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/llvmlite/envs/latest/local/lib/python2.7/site-packages/sphinx/environment.py", line 1093, in get_doctree
    f = open(doctree_filename, 'rb')
IOError: [Errno 2] No such file or directory: u'/var/build/user_builds/llvmlite/checkouts/latest/docs/_build/html/.doctrees/contents.doctree'

Exception occurred:
  File "/home/docs/checkouts/readthedocs.org/user_builds/llvmlite/envs/latest/local/lib/python2.7/site-packages/sphinx/environment.py", line 1093, in get_doctree
    f = open(doctree_filename, 'rb')
IOError: [Errno 2] No such file or directory: u'/var/build/user_builds/llvmlite/checkouts/latest/docs/_build/html/.doctrees/contents.doctree'
The full traceback has been saved in /tmp/sphinx-err-n4Ea8S.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://bitbucket.org/birkenfeld/sphinx/issues/>. Thanks!

You can see for yourself at https://readthedocs.org/builds/llvmlite/2681722/

@pitrou pitrou mentioned this issue May 5, 2015
8 tasks
@gregmuellegger
Copy link
Contributor

Seems like your builds are fine now. That's why I'm closing this ticket now. Comment here if it's still an issue for you.

Btw, I think you don't need to check for the readthedocs build in your setup.py file. You can disable the call to setup.py install in your project's settings in the admin panel.

@pitrou
Copy link
Author

pitrou commented Jul 6, 2015

Seems like your builds are fine now.

Yes, thank you.

You can disable the call to setup.py install in your project's settings in the admin panel.

Oh, great, I'll look at that.

@pitrou
Copy link
Author

pitrou commented Jul 6, 2015

You can disable the call to setup.py install in your project's settings in the admin panel.

I don't think that works. It's already disabled (is it the checkbox that says "Install your project inside a virtualenv using setup.py install"?), but the "setup.py install" call still happens. See the end of the build logs here:
https://readthedocs.org/builds/llvmlite/3048513/

@pitrou
Copy link
Author

pitrou commented Jul 6, 2015

(that checkbox is confusing, by the way, it's not obvious if it controls the use of a virtualenv, the call to setup.py install, or both at the same time; also as a user it's not obvious why I should choose one or the other...)

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

No branches or pull requests

2 participants