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

MkDocs: Tornado requires an up-to-date SSL module #659

Closed
Datseris opened this issue Mar 6, 2018 · 7 comments
Closed

MkDocs: Tornado requires an up-to-date SSL module #659

Datseris opened this issue Mar 6, 2018 · 7 comments

Comments

@Datseris
Copy link
Contributor

Datseris commented Mar 6, 2018

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.

@mortenpi
Copy link
Member

mortenpi commented Mar 6, 2018

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.

@Datseris
Copy link
Contributor Author

Datseris commented Mar 6, 2018

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"?

@mortenpi
Copy link
Member

mortenpi commented Mar 6, 2018

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)?

@Datseris
Copy link
Contributor Author

Datseris commented Mar 7, 2018

@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)

@mortenpi
Copy link
Member

mortenpi commented Mar 7, 2018

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

@Datseris
Copy link
Contributor Author

Datseris commented Mar 7, 2018

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)

@mortenpi mortenpi changed the title Tornado requires an up-to-date SSL module (Can't use MkDocs) MkDocs: Tornado requires an up-to-date SSL module Mar 7, 2018
@mortenpi mortenpi closed this as completed Mar 7, 2018
@Hugstar
Copy link

Hugstar commented May 24, 2018

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

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

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

No branches or pull requests

3 participants