I am trying to scrape text from wikipedia. Since httplib2 is already installed, I thought I would use it.
When I go through the simple retrieval from their basic examples, the first example gives me this error.
> import httplib2
> h = httplib2.Http(".cache")
> url = "http://code.google.com/p/httplib2/"
> h.request(url, "GET")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/httplib2/__init__.py", line 978, in request
cached_value = self.cache.get(cachekey)
File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/httplib2/__init__.py", line 625, in get
cacheFullPath = os.path.join(self.cache, self.safe(key))
File "/Library/Frameworks/EPD64.framework/Versions/7.2/lib/python2.7/site-packages/httplib2/__init__.py", line 189, in safename
filemd5 = md5.new(filename).hexdigest()
AttributeError: 'builtin_function_or_method' object has no attribute 'new'
I'm running on Mac OS X, Python Version: 7.2-2 (64-bit), Enthought Distribution.
I'm thinking it might be an issue with a faulty installation, but then again httplib2 came installed with other packages that I've been using. Also, I could try to reinstall httplib2, but I'm hesitant to do that, thinking it might break other things that are currently working.