Dave Perrett

HTTPSHandler Error Using Python 2.5 and GAE on OS X

linux, osx, programming, python, quickie, web

If you are getting an error complaining that ‘module’ object has no attribute ‘HTTPSHandler’ running python 2.5 on OS X :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Traceback (most recent call last):
  File "manage.py", line 4, in <module>
    setup_env(manage_py_env=True)
  File "/Users/dave/Desktop/gae-gallery/common/appenginepatch/aecmd.py", line 63, in setup_env
    patch_all()
  File "/Users/dave/Desktop/gae-gallery/common/appenginepatch/appenginepatcher/patch.py", line 20, in patch_all
    patch_app_engine()
  File "/Users/dave/Desktop/gae-gallery/common/appenginepatch/appenginepatcher/patch.py", line 413, in patch_app_engine
    from django.db.models import signals
  File "/Users/dave/Desktop/gae-gallery/__init__.py", line 57, in <module>

  File "/Users/dave/Desktop/gae-gallery/common/zip-packages/django-1.0.2.zip/django/db/backends/appengine/base.py", line 133, in __init__
  File "/Users/dave/Desktop/gae-gallery/common/zip-packages/django-1.0.2.zip/django/db/backends/appengine/base.py", line 145, in _setup_stubs
  File "/Applications/Personal/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 483, in <module>
    SetGlobals()
  File "/Applications/Personal/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 84, in SetGlobals
    from google.appengine.tools import appcfg
  File "/Applications/Personal/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appcfg.py", line 55, in <module>
    from google.appengine.tools import appengine_rpc
  File "/Applications/Personal/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/appengine_rpc.py", line 31, in <module>
    https_handler = urllib2.HTTPSHandler
AttributeError: 'module' object has no attribute 'HTTPSHandler'

… you need to install py25-socket-ssl :

1
> sudo port install py25-socket-ssl