This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ImportError: cannot import name HAS_ALPN
Type: behavior Stage: resolved
Components: SSL, Windows Versions: Python 2.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: Jhleite, christian.heimes, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2017-08-05 13:41 by Jhleite, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg299781 - (view) Author: José Leite (Jhleite) Date: 2017-08-05 13:41
When Running Web2py with Python 2.7.11 or 2.7.13 in windows 10 I get the following error:

Traceback (most recent call last):
File "C:\web2py\web2py.py", line 21, in 
import gluon.widget
File "C:\web2py\gluon\widget.py", line 26, in 
from gluon import main, newcron
File "C:\web2py\gluon\main.py", line 28, in 
import ssl
File "C:\Python27\lib\ssl.py", line 126, in 
from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN, HAS_ALPN
ImportError: cannot import name HAS_ALPN

----------------------------------------------------
It seem like a windows Python bug in _ssl.py
msg299782 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-08-05 13:49
There is no _ssl.py. The internal _ssl module is a C extension module. Under Windows it is called _ssl.pyd. Do you have a _ssl.py  or _ssl package in your project that may confict with _ssl.pyd?
msg299785 - (view) Author: José Leite (Jhleite) Date: 2017-08-05 14:45
Yes, there is such a file. I will report to web2py developers for windows version.
Thanks, renamed the file and everything seems fine.
msg299786 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2017-08-05 14:55
Thanks!
msg299789 - (view) Author: José Leite (Jhleite) Date: 2017-08-05 15:22
Thank You very much!!!
Thumbs up!
History
Date User Action Args
2022-04-11 14:58:49adminsetgithub: 75307
2017-08-05 15:22:04Jhleitesetmessages: + msg299789
2017-08-05 14:55:13christian.heimessetmessages: + msg299786
2017-08-05 14:55:02christian.heimessetstatus: open -> closed
type: behavior
resolution: third party
stage: resolved
2017-08-05 14:45:58Jhleitesetmessages: + msg299785
2017-08-05 13:49:54christian.heimessetmessages: + msg299782
2017-08-05 13:41:21Jhleitecreate