ERROR:root:code for hash md5 was not found

bidzina_kapanadze at iliauni.edu.ge bidzina_kapanadze at iliauni.edu.ge
Tue Feb 5 10:10:04 EST 2013


On Wednesday, January 11, 2012 12:28:52 PM UTC+1, Laurent Claessens wrote:
> 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 "<stdin>", line 1, in <module>
> 
>    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

Dear Laurent,

I have encountered similar problem and your suggestion was helpful. Thanks a lot!

Sincerely,

Bidzina Kapanadze,
Abastumani Astrophysical Observatory,
Ilia State University, Tbilisi, Georgia



More information about the Python-list mailing list