bgreenlee/sublime-github — Issue #6: ImportError: cannot import name HTTPSConnection
Author: naholyr
Created: 2012-02-14 15:43:12+00:00
State: open

Hello,

After installing this plugin from Package Control on a Ubuntu 11.10 system, I get this in the console:
{{{
Reloading plugin /home/nchambrier/.config/sublime-text-2/Packages/sublime-github/gist.py
Traceback (most recent call last):
File "./sublime_plugin.py", line 62, in reload_plugin
File "./gist.py", line 10, in
import requests
File "/home/nchambrier/.config/sublime-text-2/Packages/sublime-github/lib/requests/__init__.py", line 26, in
from . import utils
File "/home/nchambrier/.config/sublime-text-2/Packages/sublime-github/lib/requests/utils.py", line 19, in
from .compat import parse_http_list as _parse_list_header
File "/home/nchambrier/.config/sublime-text-2/Packages/sublime-github/lib/requests/compat.py", line 86, in
from .packages.oreos.monkeys import SimpleCookie
File "/home/nchambrier/.config/sublime-text-2/Packages/sublime-github/lib/requests/packages/__init__.py", line 3, in
from . import urllib3
File "/home/nchambrier/.config/sublime-text-2/Packages/sublime-github/lib/requests/packages/urllib3/__init__.py", line 16, in
from .connectionpool import (
File "/home/nchambrier/.config/sublime-text-2/Packages/sublime-github/lib/requests/packages/urllib3/connectionpool.py", line 22, in
from httplib import HTTPConnection, HTTPSConnection, HTTPException
ImportError: cannot import name HTTPSConnection
}}}

The thing I don't understand is that I have only one version of Python installed, and when I run python REPL I can see the import working:

{{{
$ python
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from httplib import HTTPConnection, HTTPSConnection, HTTPException
>>> HTTPSConnection

}}}