Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!gegeweb.42!gegeweb.eu!news.le-studio75.com!news.univ-fcomte.fr!not-for-mail From: Laurent Claessens Newsgroups: comp.lang.python Subject: Re: ERROR:root:code for hash md5 was not found Date: Wed, 11 Jan 2012 12:28:52 +0100 Organization: A poorly-installed InterNetNews site Lines: 40 Message-ID: <4F0D7274.9080905@gmail.com> References: NNTP-Posting-Host: soleil.univ-fcomte.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.univ-fcomte.fr 1326281329 31625 194.57.84.1 (11 Jan 2012 11:28:49 GMT) X-Complaints-To: news@news.univ-fcomte.fr NNTP-Posting-Date: Wed, 11 Jan 2012 11:28:49 +0000 (UTC) To: mike User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Thunderbird/3.1.16 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18820 Le 11/01/2012 12:19, mike a écrit : > Hi, > > We are running are running Python program on Redhat 5.5. > > When executing our program we get the following error ( see below). > > Any ideas what this is due to? On my computer hashlib has "md5" : Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib >>> h=hashlib.new("md5") >>> h.update("Hello") >>> h.hexdigest() 'd992641f1b2b9c08b569c0a17c4e7cb8' While if I ask for a hash method that hashlib does not know, I get the same error as you : >>> g=hashlib.new("bla") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/hashlib.py", line 101, in __hash_new return __get_builtin_constructor(name)(string) File "/usr/lib/python2.6/hashlib.py", line 80, in __get_builtin_constructor raise ValueError, "unsupported hash type" ValueError: unsupported hash type You should give us a more comprehensive example of your problem. Laurent