Repository: readthedocs/readthedocs.org

Issue:
Failure installing readthedocs-sphinx-ext 0.5.3
We bring in recommonmark as part of the rtd extension, seems it isn't installed as a dependency possibly.

```
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages/sphinx/cmdline.py", line 244, in main
    opts.warningiserror, opts.tags, opts.verbosity, opts.jobs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages/sphinx/application.py", line 126, in __init__
    confoverrides or {}, self.tags)
  File "/home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages/sphinx/config.py", line 277, in __init__
    execfile_(filename, config)
  File "/home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages/sphinx/util/pycompat.py", line 128, in execfile_
    exec_(code, _globals)
  File "conf.py", line 300, in <module>
    from recommonmark.parser import CommonMarkParser
ImportError: No module named 'recommonmark'

Exception occurred:
  File "conf.py", line 300, in <module>
    from recommonmark.parser import CommonMarkParser
ImportError: No module named 'recommonmark'
```



Discussion:
Noticed this as part of JuliaLang/julia#11527

Actually, I should have continued looking at the build errors. Seems this is just a side effect of requirements installation failures:

```
Requirement already up-to-date: sphinx==1.3.1 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages
Requirement already up-to-date: Pygments==2.0.2 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages
Collecting virtualenv==1.10.1
Collecting setuptools==1.1
Collecting docutils==0.11
Collecting mkdocs==0.13.3
  Using cached mkdocs-0.13.3-py2.py3-none-any.whl
Collecting mock==1.0.1
Collecting pillow==2.6.1
Collecting readthedocs-sphinx-ext==0.5.3
  Using cached readthedocs_sphinx_ext-0.5.3-py2.py3-none-any.whl
Collecting sphinx-rtd-theme==0.1.8
  Using cached sphinx_rtd_theme-0.1.8-py2.py3-none-any.whl
Collecting recommonmark==0.1.1
  Using cached recommonmark-0.1.1-py2.py3-none-any.whl
Requirement already up-to-date: alabaster<0.8,>=0.7 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
Requirement already up-to-date: snowballstemmer>=1.1 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
Requirement already up-to-date: Jinja2>=2.3 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
Requirement already up-to-date: babel>=1.3 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
Requirement already up-to-date: six>=1.4 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
Collecting PyYAML>=3.10 (from mkdocs==0.13.3)
Collecting click>=4.0 (from mkdocs==0.13.3)
  Using cached click-4.0-py2.py3-none-any.whl
Collecting livereload>=2.3.2 (from mkdocs==0.13.3)
  Using cached livereload-2.4.0-py2.py3-none-any.whl
Collecting tornado>=4.1 (from mkdocs==0.13.3)
Collecting Markdown>=2.3.1 (from mkdocs==0.13.3)
  Using cached Markdown-2.6.2-py2.py3-none-any.whl
Collecting ghp-import>=0.4.1 (from mkdocs==0.13.3)
Collecting nilsimsa (from readthedocs-sphinx-ext==0.5.3)
  Using cached nilsimsa-0.3.6.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-d5ecjt_7/nilsimsa/setup.py", line 5, in <module>
        from version import get_git_version
      File "/tmp/pip-build-d5ecjt_7/nilsimsa/version.py", line 78
        except Exception, exc:
                        ^
    SyntaxError: invalid syntax

    ----------------------------------------
```

Confirmed the server that ran this is using a new readthedocs-sphinx-ext (`0.5.3`), versus the other servers which use `0.4.4`. This seems to possibly be triggered by import of the nilsimsa package via the extension.

I believe this is probably a bug where we don't stop building after
requirements fail. We should just not try and build docs in that case,
which is likely what the real issue is.

On Thu, Jun 11, 2015 at 12:39 PM, Anthony notifications@github.com wrote:

> Actually, I should have continued looking at the build errors. Seems this
> is just a side effect of requirements installation failures:
> 
> Requirement already up-to-date: sphinx==1.3.1 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages
> Requirement already up-to-date: Pygments==2.0.2 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages
> Collecting virtualenv==1.10.1
> Collecting setuptools==1.1
> Collecting docutils==0.11
> Collecting mkdocs==0.13.3
>   Using cached mkdocs-0.13.3-py2.py3-none-any.whl
> Collecting mock==1.0.1
> Collecting pillow==2.6.1
> Collecting readthedocs-sphinx-ext==0.5.3
>   Using cached readthedocs_sphinx_ext-0.5.3-py2.py3-none-any.whl
> Collecting sphinx-rtd-theme==0.1.8
>   Using cached sphinx_rtd_theme-0.1.8-py2.py3-none-any.whl
> Collecting recommonmark==0.1.1
>   Using cached recommonmark-0.1.1-py2.py3-none-any.whl
> Requirement already up-to-date: alabaster<0.8,>=0.7 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
> Requirement already up-to-date: snowballstemmer>=1.1 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
> Requirement already up-to-date: Jinja2>=2.3 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
> Requirement already up-to-date: babel>=1.3 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
> Requirement already up-to-date: six>=1.4 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
> Collecting PyYAML>=3.10 (from mkdocs==0.13.3)
> Collecting click>=4.0 (from mkdocs==0.13.3)
>   Using cached click-4.0-py2.py3-none-any.whl
> Collecting livereload>=2.3.2 (from mkdocs==0.13.3)
>   Using cached livereload-2.4.0-py2.py3-none-any.whl
> Collecting tornado>=4.1 (from mkdocs==0.13.3)
> Collecting Markdown>=2.3.1 (from mkdocs==0.13.3)
>   Using cached Markdown-2.6.2-py2.py3-none-any.whl
> Collecting ghp-import>=0.4.1 (from mkdocs==0.13.3)
> Collecting nilsimsa (from readthedocs-sphinx-ext==0.5.3)
>   Using cached nilsimsa-0.3.6.tar.gz
>     Complete output from command python setup.py egg_info:
>     Traceback (most recent call last):
>       File "<string>", line 20, in <module>
>       File "/tmp/pip-build-d5ecjt_7/nilsimsa/setup.py", line 5, in <module>
>         from version import get_git_version
>       File "/tmp/pip-build-d5ecjt_7/nilsimsa/version.py", line 78
>         except Exception, exc:
>                         ^
>     SyntaxError: invalid syntax
> 
> ```
> ----------------------------------------
> ```
> 
> Confirmed the server that ran this is using a new sphinx-rtd-extension (
> 0.5.3), versus the other servers which use 0.4.4. This seems to possibly
> be triggered by import of the nilsimsa package via the extension.
> 
> —
> Reply to this email directly or view it on GitHub
> https://github.com/rtfd/readthedocs.org/issues/1337#issuecomment-111255787
> .

## 

Eric Holscher
Maker of the internet residing in Portland, Oregon
http://ericholscher.com

Ah, wonder if that's a py3 issue.

On Thu, Jun 11, 2015 at 12:40 PM, Eric Holscher eric@ericholscher.com
wrote:

> I believe this is probably a bug where we don't stop building after
> requirements fail. We should just not try and build docs in that case,
> which is likely what the real issue is.
> 
> On Thu, Jun 11, 2015 at 12:39 PM, Anthony notifications@github.com
> wrote:
> 
> > Actually, I should have continued looking at the build errors. Seems this
> > is just a side effect of requirements installation failures:
> > 
> > Requirement already up-to-date: sphinx==1.3.1 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages
> > Requirement already up-to-date: Pygments==2.0.2 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages
> > Collecting virtualenv==1.10.1
> > Collecting setuptools==1.1
> > Collecting docutils==0.11
> > Collecting mkdocs==0.13.3
> >   Using cached mkdocs-0.13.3-py2.py3-none-any.whl
> > Collecting mock==1.0.1
> > Collecting pillow==2.6.1
> > Collecting readthedocs-sphinx-ext==0.5.3
> >   Using cached readthedocs_sphinx_ext-0.5.3-py2.py3-none-any.whl
> > Collecting sphinx-rtd-theme==0.1.8
> >   Using cached sphinx_rtd_theme-0.1.8-py2.py3-none-any.whl
> > Collecting recommonmark==0.1.1
> >   Using cached recommonmark-0.1.1-py2.py3-none-any.whl
> > Requirement already up-to-date: alabaster<0.8,>=0.7 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
> > Requirement already up-to-date: snowballstemmer>=1.1 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
> > Requirement already up-to-date: Jinja2>=2.3 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
> > Requirement already up-to-date: babel>=1.3 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
> > Requirement already up-to-date: six>=1.4 in /home/docs/checkouts/readthedocs.org/user_builds/julia/envs/latest/lib/python3.4/site-packages (from sphinx==1.3.1)
> > Collecting PyYAML>=3.10 (from mkdocs==0.13.3)
> > Collecting click>=4.0 (from mkdocs==0.13.3)
> >   Using cached click-4.0-py2.py3-none-any.whl
> > Collecting livereload>=2.3.2 (from mkdocs==0.13.3)
> >   Using cached livereload-2.4.0-py2.py3-none-any.whl
> > Collecting tornado>=4.1 (from mkdocs==0.13.3)
> > Collecting Markdown>=2.3.1 (from mkdocs==0.13.3)
> >   Using cached Markdown-2.6.2-py2.py3-none-any.whl
> > Collecting ghp-import>=0.4.1 (from mkdocs==0.13.3)
> > Collecting nilsimsa (from readthedocs-sphinx-ext==0.5.3)
> >   Using cached nilsimsa-0.3.6.tar.gz
> >     Complete output from command python setup.py egg_info:
> >     Traceback (most recent call last):
> >       File "<string>", line 20, in <module>
> >       File "/tmp/pip-build-d5ecjt_7/nilsimsa/setup.py", line 5, in <module>
> >         from version import get_git_version
> >       File "/tmp/pip-build-d5ecjt_7/nilsimsa/version.py", line 78
> >         except Exception, exc:
> >                         ^
> >     SyntaxError: invalid syntax
> > 
> > ```
> > ----------------------------------------
> > ```
> > 
> > Confirmed the server that ran this is using a new sphinx-rtd-extension (
> > 0.5.3), versus the other servers which use 0.4.4. This seems to possibly
> > be triggered by import of the nilsimsa package via the extension.
> > 
> > —
> > Reply to this email directly or view it on GitHub
> > https://github.com/rtfd/readthedocs.org/issues/1337#issuecomment-111255787
> > .
> 
> ## 
> 
> Eric Holscher
> Maker of the internet residing in Portland, Oregon
> http://ericholscher.com

## 

Eric Holscher
Maker of the internet residing in Portland, Oregon
http://ericholscher.com

It is, on the nilsimsa package, they are working on py3 support still. Opened rtfd/readthedocs-sphinx-ext#8

Testing hack patch now, should have a PR up soon to address this temporarily.

> Confirmed the server that ran this is using a new readthedocs-sphinx-ext (0.5.3), versus the other servers which use 0.4.4.

I was wondering why only about half of the builds had failures.

The trouble module was patched earlier, waiting on a release of readthedocs-sphinx-ext 0.5.4 with more py3 fixes.


Resolving patch:
diff --git a/readthedocs/projects/tasks.py b/readthedocs/projects/tasks.py
--- a/readthedocs/projects/tasks.py
+++ b/readthedocs/projects/tasks.py
@@ -336,7 +336,7 @@ def setup_environment(version):
         'mkdocs==0.13.3',
         'mock==1.0.1',
         'pillow==2.6.1',
-        'readthedocs-sphinx-ext==0.5.3',
+        'readthedocs-sphinx-ext==0.5.4',
         'sphinx-rtd-theme==0.1.8',
         'recommonmark==0.1.1',
     ])


Test patch: