import error dealing with httplib

28 views
Skip to first unread message

matthew Clemens

unread,
Feb 2, 2012, 12:54:53 PM2/2/12
to Twython Talk
I receive this error when I try to just import,
any suggestions for a fix.
Traceback (most recent call last):
File "machinelearntest.py", line 2, in <module>
from twython import Twython
File "/home/student/mclemens/programming/test_env/lib/python2.7/site-
packages/twython/__init__.py", line 1, in <module>
from twython import Twython
File "/home/student/mclemens/programming/test_env/lib/python2.7/site-
packages/twython/twython.py", line 14, in <module>
import cgi
File "/home/student/mclemens/lib/python2.7/cgi.py", line 51, in
<module>
import mimetools
File "/home/student/mclemens/lib/python2.7/mimetools.py", line 6, in
<module>
import tempfile
File "/home/student/mclemens/lib/python2.7/tempfile.py", line 34, in
<module>
from random import Random as _Random
File "/home/student/mclemens/programming/RandPython/random.py", line
7, in <module>
import requests
File "/home/student/mclemens/programming/test_env/lib/python2.7/site-
packages/requests/__init__.py", line 26, in <module>
from . import utils
File "/home/student/mclemens/programming/test_env/lib/python2.7/site-
packages/requests/utils.py", line 19, in <module>
from .compat import parse_http_list as _parse_list_header
File "/home/student/mclemens/programming/test_env/lib/python2.7/site-
packages/requests/compat.py", line 84, in <module>
from urllib2 import parse_http_list
File "/home/student/mclemens/lib/python2.7/urllib2.py", line 94, in
<module>
import httplib
File "/home/student/mclemens/lib/python2.7/httplib.py", line 218, in
<module>
class HTTPMessage(mimetools.Message):
AttributeError: 'module' object has no attribute 'Message'

Ryan McGrath

unread,
Feb 6, 2012, 12:15:20 PM2/6/12
to Twython Talk
Hey there,

This error is odd. Can you give me any more information about your
environment - e.g, where's this code running, what other modules are
you using, etc?

Thanks,

- Ryan
Reply all
Reply to author
Forward
0 new messages