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

Build is still looking for conf.py in source directory despite using -c option #11

Closed
maryaB-osr opened this issue May 11, 2020 · 2 comments · Fixed by #13 or #27
Closed

Build is still looking for conf.py in source directory despite using -c option #11

maryaB-osr opened this issue May 11, 2020 · 2 comments · Fixed by #13 or #27
Labels
bug Something isn't working

Comments

@maryaB-osr
Copy link

Hi, I'm getting the following error when trying to run sphinx-multiversion -c . source build/html (where source is <source-dir> according to sphinx-build docs, but conf.py is in the directory one level up):

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/marya/py3venv/lib/python3.6/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/home/marya/py3venv/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 63, in execfile_
    with open(filepath, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp7lb2mv5u/7687b9e76fa53a6f2197c5ab84ab1325b546d19b/source/conf.py'

It looks like the tool is still looking for conf.py in source even though I'm using -c. The same statement works when using sphinx-build instead of sphinx-multiversion so I think it might be a bug with how sphinx-multiversion handles -c.

Directory structure:

+-- .
|    +-- _templates
|    +-- build
|    +-- source
     |   +-- index.rst
|    +-- conf.py

Versions:

Python 3.6.9
Sphinx==3.0.3
sphinx-multiversion==0.2.3
@Holzhaus
Copy link
Owner

Hi @maryaB-osr, thanks for reporting this issue.

I pushed a fix in PR #13. Please check if it works for you.

@maryaB-osr
Copy link
Author

Hi @Holzhaus, sorry for the delay. I was able to get the versions built with #13.
There is another issue (not being able to get the versions/branches/tags list to render in the side bar) that I was trying to debug, but it seems to most likely be a separate issue. So you can merge/close, thanks!

Holzhaus added a commit that referenced this issue Aug 5, 2020
In an attempt to fix #11, the patch provided in #13 actually broke
support for repositories that did not always had sphinx-multiversion
configured. This commit restores the original behaviour of always using
the config file passed to `sphinx-multiversion`, not the config file
from the git revision that is currently built.

Resolves #15.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants