{"action":"opened","issue":{"url":"https://api.github.com/repos/requests/requests-ntlm/issues/54","labels_url":"https://api.github.com/repos/requests/requests-ntlm/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/requests/requests-ntlm/issues/54/comments","events_url":"https://api.github.com/repos/requests/requests-ntlm/issues/54/events","html_url":"https://github.com/requests/requests-ntlm/issues/54","id":53460611,"number":54,"title":"Import error","user":{"login":"LiaungYip","id":2173684,"avatar_url":"https://avatars.githubusercontent.com/u/2173684?v=3","gravatar_id":"","url":"https://api.github.com/users/LiaungYip","html_url":"https://github.com/LiaungYip","followers_url":"https://api.github.com/users/LiaungYip/followers","following_url":"https://api.github.com/users/LiaungYip/following{/other_user}","gists_url":"https://api.github.com/users/LiaungYip/gists{/gist_id}","starred_url":"https://api.github.com/users/LiaungYip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiaungYip/subscriptions","organizations_url":"https://api.github.com/users/LiaungYip/orgs","repos_url":"https://api.github.com/users/LiaungYip/repos","events_url":"https://api.github.com/users/LiaungYip/events{/privacy}","received_events_url":"https://api.github.com/users/LiaungYip/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-05T23:16:09Z","updated_at":"2015-01-05T23:16:09Z","closed_at":null,"body":"Attempting to import requests_ntlm on Python 2.7.9 raises a TypeError. This renders the module unusable.\r\n\r\nSee also this StackOverflow question about a very similar error: http://stackoverflow.com/questions/27660034/python-requests-ntlm-import-error . (The user in that post got a `'long' object is not subscriptable` error. I had also experienced that error before updating Python to latest.)\r\n\r\n```\r\nPS C:\\Users\\lws> python\r\nPython 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import requests_ntlm\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"C:\\Python27\\lib\\site-packages\\requests_ntlm\\__init__.py\", line 1, in <module>\r\n    from .requests_ntlm import HttpNtlmAuth\r\n  File \"C:\\Python27\\lib\\site-packages\\requests_ntlm\\requests_ntlm.py\", line 4, in <module>\r\n    from ntlm3 import ntlm\r\n  File \"C:\\Python27\\lib\\site-packages\\ntlm3\\__init__.py\", line 2, in <module>\r\n    from . import HTTPNtlmAuthHandler  # noqa\r\n  File \"C:\\Python27\\lib\\site-packages\\ntlm3\\HTTPNtlmAuthHandler.py\", line 20, in <module>\r\n    from . import ntlm\r\n  File \"C:\\Python27\\lib\\site-packages\\ntlm3\\ntlm.py\", line 25, in <module>\r\n    from . import des\r\n  File \"C:\\Python27\\lib\\site-packages\\ntlm3\\des.py\", line 19, in <module>\r\n    from . import des_c\r\n  File \"C:\\Python27\\lib\\site-packages\\ntlm3\\des_c.py\", line 19, in <module>\r\n    from .des_data import des_SPtrans, des_skb\r\n  File \"C:\\Python27\\lib\\site-packages\\ntlm3\\des_data.py\", line 25, in <module>\r\n    U32(0x00820200), U32(0x00020000), U32(0x80800000), U32(0x80820200),\r\n  File \"C:\\Python27\\lib\\site-packages\\ntlm3\\U32.py\", line 32, in __init__\r\n    value = six.byte2int(value)\r\n  File \"C:\\Python27\\lib\\site-packages\\six.py\", line 625, in byte2int\r\n    return ord(bs[0])\r\nTypeError: 'long' object has no attribute '__getitem__'\r\n>>>\r\n```\r\n\r\nPackage versions in use:\r\n```\r\nPS C:\\Users\\lws> pip show requests-ntlm requests python-ntlm3 six\r\n---\r\nName: requests-ntlm\r\nVersion: 0.1.0\r\nLocation: c:\\python27\\lib\\site-packages\r\nRequires: requests, python-ntlm3\r\n---\r\nName: requests\r\nVersion: 2.5.1\r\nLocation: c:\\python27\\lib\\site-packages\r\nRequires:\r\n---\r\nName: python-ntlm3\r\nVersion: 1.0.1\r\nLocation: c:\\python27\\lib\\site-packages\r\nRequires: six\r\n---\r\nName: six\r\nVersion: 1.9.0\r\nLocation: c:\\python27\\lib\\site-packages\r\nRequires:\r\n```"}}