Documenter.jl: MkDocs: Tornado requires an up-to-date SSL module

Created on 6 Mar 2018  路  7Comments  路  Source: JuliaDocs/Documenter.jl

Hello,

I am getting the unfortunate error in all my docs which I use the Documenter+MkDocs wonderful combo:

.
.
.
Documenter: populating indices.
Documenter: rendering document.
Documenter: copying assets to build directory.
Collecting mkdocs
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading mkdocs-0.17.2-py2.py3-none-any.whl (1.2MB)
Collecting tornado>=4.1 (from mkdocs)
  Downloading tornado-5.0.tar.gz (504kB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-RNIx9u/tornado/setup.py", line 146, in <module>
        raise ImportError("Tornado requires an up-to-date SSL module. This means "
    ImportError: Tornado requires an up-to-date SSL module. This means Python 2.7.9+ or 3.4+ (although some distributions have backported the necessary changes to older versions).

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-RNIx9u/tornado/
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
ERROR: LoadError: failed process: Process(`pip install --user mkdocs`, ProcessExited(1)) [1]
Stacktrace:
 [1] pipeline_error(::Base.Process) at ./process.jl:682
 [2] run(::Cmd) at ./process.jl:651
 [3] pip(::String, ::Vararg{String,N} where N) at /home/travis/.julia/v0.6/Documenter/src/Deps.jl:34
 [4] include_from_node1(::String) at ./loading.jl:576
 [5] include(::String) at ./sysimg.jl:14
while loading /home/travis/.julia/v0.6/DynamicalSystems/docs/make.jl, in expression starting on line 5

I am guessing that this may not be related to documenter. If so, sorry!

This issue started happening only recently, this week in fact I think.

Upstream

Most helpful comment

As @mortenpi suggested - the command that solved it for me:

sudo pip install 'Tornado>=4.0.0,<5.0.0'

All 7 comments

Yeah, it looks like the Python (version 2.7.5?) on Travis doesn't have certain SSL/TLS fixes which Tornado 5.0 (released two days ago on 2018-03-05) requires. I would have assumed that Ubuntu would be one of those platforms that has "backported the necessary changes to older versions" though since Trusty is not EOL yet.

You could try forcing Tornado to an older version by modifying deploydocs's deps argument.

Thanks @mortenpi . I am sorry for the really noobish question, but how do I do this modification in my deplydocs?

deploydocs(
    deps   = Deps.pip("mkdocs",
    "mkdocs-material" ,"python-markdown-math", "pygments", "pymdown-extensions"),
    repo   = "github.com/JuliaDynamics/DynamicalSystems.jl.git",
    julia  = "0.6",
    osname = "linux"
)

Should I write in addition "Tornado-4"?

pip has a specific syntax for pinning. It should also be possible to do version ranges with pip and the arguments of Deps.pip get passed directly on to pip as command line argument. So "Tornado>=4.0.0,<5.0.0" might work (haven't tried though)?

@mortenpi The suggestion worked fine and now I once again have correct docs operational!!!

Also super thanks for helping even though the issue is totally unrelated with Documenter. (you can close this one)

Would you mind copying the exact solution here? I am thinking it could be helpful for others as well.

Of course. I simply changed the deploydocs that I posted above to:

deploydocs(
    deps   = Deps.pip("Tornado>=4.0.0,<5.0.0", "mkdocs",
    "mkdocs-material" ,"python-markdown-math", "pygments", "pymdown-extensions"),
    repo   = "github.com/JuliaDynamics/DynamicalSystems.jl.git",
    julia  = "0.6",
    osname = "linux"
)

(so I just added "Tornado>=4.0.0,<5.0.0", as first argument)

As @mortenpi suggested - the command that solved it for me:

sudo pip install 'Tornado>=4.0.0,<5.0.0'

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haampie picture haampie  路  3Comments

dkarrasch picture dkarrasch  路  5Comments

Datseris picture Datseris  路  4Comments

jonathan-laurent picture jonathan-laurent  路  3Comments

Roger-luo picture Roger-luo  路  3Comments