Skip to content

Fix issue where we can't find conf.py and raise bad error. #2634

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

Merged
merged 1 commit into from
Feb 8, 2017

Conversation

ericholscher
Copy link
Member

This was causing users with invalid conf.py file settings
to get an "unknown error" message.

This was the traceback that was fixed:

Feb  7 20:55:41 build01 readthedocs/readthedocs.doc_builder.environments[32422]: ERROR (Build) [flowframework:latest] Conf File Missing. Please make sure you have a conf.py in your project. [readthedocs.doc_builder.environments:306]
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 170, in run
    outcomes = self.build_docs()
  File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 331, in build_docs
    outcomes['html'] = self.build_docs_html()
  File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 348, in build_docs_html
    html_builder.append_conf()
  File "/home/docs/checkouts/readthedocs.org/readthedocs/doc_builder/backends/sphinx.py", line 68, in append_conf
    outfile_path = project.conf_file(self.version.slug)
  File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/models.py", line 539, in conf_file
    u"Conf File Missing. Please make sure you have a conf.py in your project.")
ProjectImportError: Conf File Missing. Please make sure you have a conf.py in your project

This was causing users with invalid conf.py file settings
to get an "unknown error" message.

This was the traceback that was fixed:

```
Feb  7 20:55:41 build01 readthedocs/readthedocs.doc_builder.environments[32422]: ERROR (Build) [flowframework:latest] Conf File Missing. Please make sure you have a conf.py in your project. [readthedocs.doc_builder.environments:306]
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 170, in run
    outcomes = self.build_docs()
  File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 331, in build_docs
    outcomes['html'] = self.build_docs_html()
  File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 348, in build_docs_html
    html_builder.append_conf()
  File "/home/docs/checkouts/readthedocs.org/readthedocs/doc_builder/backends/sphinx.py", line 68, in append_conf
    outfile_path = project.conf_file(self.version.slug)
  File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/models.py", line 539, in conf_file
    u"Conf File Missing. Please make sure you have a conf.py in your project.")
ProjectImportError: Conf File Missing. Please make sure you have a conf.py in your project
```
@ericholscher ericholscher added the PR: work in progress Pull request is not ready for full review label Feb 7, 2017
Copy link
Contributor

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

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

This is marked WIP, but looks good if it's complete.

@ericholscher ericholscher merged commit 7355927 into master Feb 8, 2017
@ericholscher ericholscher removed the PR: work in progress Pull request is not ready for full review label Feb 8, 2017
@berkerpeksag berkerpeksag deleted the fix-conf-error branch February 9, 2017 11:04
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

Successfully merging this pull request may close these issues.

2 participants