Re: ERROR:root:code for hash md5 was not found

2013-02-05 Thread bidzina_kapanadze
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
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2013-02-04 Thread dieter
Ibad Kureshi U0850037 u0850...@hud.ac.uk writes:

 I am bit new to python and am struggling to install NumPy and SciPy on to 
 Python 2.7. Based on my understanding I believe that the problem is with my 
 Python install rather than the way I am installing NumPy. I have seen only 
 two other threads that deal with this issue but both threads just end with no 
 solutions.

 I am on a CENTOS 5.8 system. With python 2.7 installed from source in a self 
 contained folder. I am using environment modules to manage the different 
 versions of python.

 When I invoke the NumPy installer I get the following:


 python setup.py build --fcompiler=gnu95
 Running from numpy source directory.ERROR:root:code for hash md5 was not 
 found.
 Traceback (most recent call last):
   File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 139, in 
 module

This likely indicates some problem with openssl support:
on some platforms, hashlib delegates to the openssl libraries.

As a first step, I would verify that the openssl development
package (on OS, not Python level) is installed. If not, install it.
Then regenerate your local Python and check whether the problem
has disappeared.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2013-02-03 Thread Ibad Kureshi U0850037
Hello,

I am bit new to python and am struggling to install NumPy and SciPy on to 
Python 2.7. Based on my understanding I believe that the problem is with my 
Python install rather than the way I am installing NumPy. I have seen only two 
other threads that deal with this issue but both threads just end with no 
solutions.

I am on a CENTOS 5.8 system. With python 2.7 installed from source in a self 
contained folder. I am using environment modules to manage the different 
versions of python.

When I invoke the NumPy installer I get the following:


python setup.py build --fcompiler=gnu95
Running from numpy source directory.ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 91, in 
__get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
..
..
AttributeError: 'module' object has no attribute 'md5'

If I start python and try to call the file I see the following:


python
Python 2.7.3 (default, Oct 11 2012, 14:00:07)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type help, copyright, credits or license for more information.
 import sys
print(sys.version)
import hashlib
print(hashlib.__file__)
print(hashlib.md5)
import _md5
print(_md5.__file__)  2.7.3 (default, Oct 11 2012, 14:00:07)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]
 ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 91, in 
__get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 91, in 
__get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 91, in 
__get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 91, in 
__get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 91, in 
__get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /apps/libs/python/2.7.3/lib/python2.7/hashlib.py, line 91, in 
__get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha512
 /apps/libs/python/2.7.3/lib/python2.7/hashlib.pyc
 Traceback (most recent call last):
  File stdin, line 1, in module
AttributeError: 'module' object has no attribute 'md5'
 Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: No module named _md5


Any help would be greatly appreciated.

-Ibad


---
This transmission is confidential and may be legally privileged. If you receive 
it in error, please notify us immediately by e-mail and remove it from your 
system. If the content of this e-mail does not relate to the business of the 
University of Huddersfield, then we do not endorse it and will accept no 
liability.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-09-27 Thread Klaus
I had that problem after moving my Python installation into another directory. 
Reinstalling Python helped.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-14 Thread Marc Christiansen
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
 On Fri, 13 Jan 2012 06:14:50 -0800, mike wrote:
 pysibelius is a lib that we use.
 
 I am not sure that is the problem since the python program works on SuSE
 but not on RH server. And AFAIK
 the only difference ( well that I can see) is the OpenSSL version.
 
 OpenSSL is irrelevant. If it isn't available, or doesn't provide md5, 
 then the hashlib library will use its own implementation. But the _md5 
 module is missing in the pysibelius Python on your RedHat system.
 
 As I said, your Python installation is seriously broken. Required modules 
 are just *gone*.
 
 pysibelius appears to have patched Python in some way, because strange 
 unexpected error messages are being printed that do not happen on a 
 normal unpatched Python, e.g.:
 
 ERROR:root:code for hash sha224 was not found.
 
 That is not a normal Python error message. That looks like something 
 added by pysibelius.

Steven, I think you're wrong with regard to the error message. 
Straight from the tarball, Python-2.7.2/Lib/hashlib.py line 135ff:

for __func_name in __always_supported:
# try them all, some may not work due to the OpenSSL
# version not supporting that algorithm.
try:
globals()[__func_name] = __get_hash(__func_name)
except ValueError:
import logging
logging.exception('code for hash %s was not found.', __func_name)

Of course this does not invalidate the fact (is that even possible?) of
the brokenness of the installation.

Ciao
  Marc
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-13 Thread mike
On Jan 13, 5:41 am, alex23 wuwe...@gmail.com wrote:
 On Jan 13, 1:34 pm, Steven D'Aprano steve

 +comp.lang.pyt...@pearwood.info wrote:
  What is pysibelius? I can't find it on the web. Does it have anything to
  do with Sibelius the music composition software?

 Yes, please provide more information about the pysibelius package,
 especially if this is the case.

 The few tenuous Python/Sibelius links I found didn't have anything on
 pysibelius, unfortunately.

Hi,

pysibelius is a lib that we use.

I am not sure that is the problem since the python program works on
SuSE but not on RH server. And AFAIK
the only difference ( well that I can see) is the OpenSSL version.

According to code it uses openssl:

built-in function openssl_md5

So I need to find a way to convince the linux sys admin to install
same version of openssl on both servers.

Thanks a lot for your valuable time.

//mike
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-13 Thread Michael Torrie
On 01/13/2012 07:14 AM, mike wrote:
 pysibelius is a lib that we use.
 
 I am not sure that is the problem since the python program works on
 SuSE but not on RH server. And AFAIK
 the only difference ( well that I can see) is the OpenSSL version.
 
 According to code it uses openssl:
 
 built-in function openssl_md5
 
 So I need to find a way to convince the linux sys admin to install
 same version of openssl on both servers.

Unfortunately that's going to be fairly difficult, as they would have to
install a new version of openssl alongside the existing system version,
which you can't just replace.  Or it might be possible to copy the
openssl libraries from SuSE over.  Either way you will have to use the
LD_LIBRARY_PATH or the LD_LIBRARY_PRELOAD environment variables to get
PySibelius to load that version instead of the system one.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-13 Thread Steven D'Aprano
On Fri, 13 Jan 2012 06:14:50 -0800, mike wrote:

 On Jan 13, 5:41 am, alex23 wuwe...@gmail.com wrote:
 On Jan 13, 1:34 pm, Steven D'Aprano steve

 +comp.lang.pyt...@pearwood.info wrote:
  What is pysibelius? I can't find it on the web. Does it have anything
  to do with Sibelius the music composition software?

 Yes, please provide more information about the pysibelius package,
 especially if this is the case.

 The few tenuous Python/Sibelius links I found didn't have anything on
 pysibelius, unfortunately.
 
 Hi,
 
 pysibelius is a lib that we use.
 
 I am not sure that is the problem since the python program works on SuSE
 but not on RH server. And AFAIK
 the only difference ( well that I can see) is the OpenSSL version.

OpenSSL is irrelevant. If it isn't available, or doesn't provide md5, 
then the hashlib library will use its own implementation. But the _md5 
module is missing in the pysibelius Python on your RedHat system.

As I said, your Python installation is seriously broken. Required modules 
are just *gone*.

pysibelius appears to have patched Python in some way, because strange 
unexpected error messages are being printed that do not happen on a 
normal unpatched Python, e.g.:

ERROR:root:code for hash sha224 was not found.

That is not a normal Python error message. That looks like something 
added by pysibelius.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-12 Thread Steven D'Aprano
On Wed, 11 Jan 2012 22:13:16 -0800, mike wrote:
[...]
 esekilx5030 [7:09am] [roamFroBl/pysibelius/bin] - python Python 2.7.2
 (default, Jun 16 2011, 15:05:49) [GCC 4.5.0] on linux2
 Type help, copyright, credits or license for more information.
 import sys
 print(sys.version)
 import hashlib
 print(hashlib.__file__)
 print(hashlib.md5)
 import _md5
 print(_md5.__file__)  2.7.2 (default, Jun 16 2011, 15:05:49) [GCC
 4.5.0]
 ERROR:root:code for hash md5 was not found.
 Traceback (most recent call last):
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 139, in module
 globals()[__func_name] = __get_hash(__func_name)
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 91, in __get_builtin_constructor
 raise ValueError('unsupported hash type %s' % name)


It looks like pysibelius comes with its own Python installation, which is 
*seriously* broken.

What is pysibelius? I can't find it on the web. Does it have anything to 
do with Sibelius the music composition software?

It looks like the installation you are trying to use is missing modules. 
You might need to consult the pysibelius forums or mailing lists, if they 
have any, or the author, or possibly re-install it and see if the problem 
goes away.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-12 Thread alex23
On Jan 13, 1:34 pm, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
 What is pysibelius? I can't find it on the web. Does it have anything to
 do with Sibelius the music composition software?

Yes, please provide more information about the pysibelius package,
especially if this is the case.

The few tenuous Python/Sibelius links I found didn't have anything on
pysibelius, unfortunately.

-- 
http://mail.python.org/mailman/listinfo/python-list


ERROR:root:code for hash md5 was not found

2012-01-11 Thread mike
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?

br,

//mike

/pysibelius/lib/common/
DataTypes.py
Overwriten ...
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File /python/lib/python2.7/hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /python/lib/python2.7/hashlib.py, line 91, in
__get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-11 Thread Laurent Claessens

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

--
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-11 Thread Terry Reedy

On 1/11/2012 6:19 AM, mike wrote:

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?

br,

//mike

/pysibelius/lib/common/



DataTypes.py
Overwriten ...
ERROR:root:code for hash md5 was not found.


These 3 lines do not come from the interpreter.
It might come from the hashlib module.


Traceback (most recent call last):
   File /python/lib/python2.7/hashlib.py, line 139, inmodule
 globals()[__func_name] = __get_hash(__func_name)
   File /python/lib/python2.7/hashlib.py, line 91, in
__get_builtin_constructor
 raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type md5


This is a standard traceback from the interpreter.
The manual says that md5 should always be available.
On the other hand, hashlib depends on the OpenSSL library on your 
system. Perhaps RedHat removed md5 because it has been broken.
I suggest you ask them or check your OpenSSL doc. The Python manual may 
need to be changed.



ERROR:root:code for hash sha1 was not found


--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-11 Thread Steven D'Aprano
On Wed, 11 Jan 2012 05:54:29 -0800, mike wrote:

 I did some more digging and found that our class imports a yacc.py
 that uses
 
 import re, types, sys, cStringIO, hashlib, os.path
 
 so it has hashlib.
 
 yacc.py seems to be an old version 1.3 ( I found 2.3 --).
 
 Reading about hashlib it seems to be dependent on os installation of
 OpenSSL but I cannot find out how.

It shouldn't be. It will use OpenSSL if available, otherwise it will fall 
back on its own code.


 br,
 
 //mike
 
 yacc.py
 ===
 
#-
 # ply: yacc.py
[snip over TWO THOUSAND lines of code]


Mike, what lead you to believe that an error in hashlib could be solved 
by posting the ENTIRE two thousand lines of yacc.py? Please do not post 
such huge chunks of code unless asked. It is unnecessary and annoying.

Try this. Open a terminal window and enter python at the prompt to 
start a clean interactive session. Then enter the following commands:

import sys
print(sys.version)
import hashlib
print(hashlib.__file__)
print(hashlib.md5)
import _md5
print(_md5.__file__)

and copy and paste (do not retype) the full output of these commands.




Thank you.




-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-11 Thread mike
On Jan 12, 12:28 am, Steven D'Aprano steve
+comp.lang.pyt...@pearwood.info wrote:
 On Wed, 11 Jan 2012 05:54:29 -0800, mike wrote:
  I did some more digging and found that our class imports a yacc.py
  that uses

  import re, types, sys, cStringIO, hashlib, os.path

  so it has hashlib.

  yacc.py seems to be an old version 1.3 ( I found 2.3 --).

  Reading about hashlib it seems to be dependent on os installation of
  OpenSSL but I cannot find out how.

 It shouldn't be. It will use OpenSSL if available, otherwise it will fall
 back on its own code.

  br,

  //mike

  yacc.py
  ===

 #-
  # ply: yacc.py

 [snip over TWO THOUSAND lines of code]

 Mike, what lead you to believe that an error in hashlib could be solved
 by posting the ENTIRE two thousand lines of yacc.py? Please do not post
 such huge chunks of code unless asked. It is unnecessary and annoying.

 Try this. Open a terminal window and enter python at the prompt to
 start a clean interactive session. Then enter the following commands:

 import sys
 print(sys.version)
 import hashlib
 print(hashlib.__file__)
 print(hashlib.md5)
 import _md5
 print(_md5.__file__)

 and copy and paste (do not retype) the full output of these commands.

 Thank you.

 --
 Steven

Hi,

Sorry for posting huge file. I added your copy-paste snippet.

esekilx5030 [7:09am] [roamFroBl/pysibelius/bin] - python
Python 2.7.2 (default, Jun 16 2011, 15:05:49)
[GCC 4.5.0] on linux2
Type help, copyright, credits or license for more information.
 import sys
print(sys.version)
import hashlib
print(hashlib.__file__)
print(hashlib.md5)
import _md5
print(_md5.__file__)  2.7.2 (default, Jun 16 2011, 15:05:49)
[GCC 4.5.0]
 ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 139, in module
globals()[__func_name] = __get_hash(__func_name)
  File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
hashlib.py, line 91, in __get_builtin_constructor
raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha512
 /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/hashlib.pyc
 Traceback (most recent call last):
  File stdin, line 1, in module
AttributeError: 'module' object has no attribute 'md5'
 Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: No module named _md5

Thanks for support!

//mike
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ERROR:root:code for hash md5 was not found

2012-01-11 Thread mike
On Jan 12, 7:13 am, mike mikaelpetters...@gmail.com wrote:
 On Jan 12, 12:28 am, Steven D'Aprano steve









 +comp.lang.pyt...@pearwood.info wrote:
  On Wed, 11 Jan 2012 05:54:29 -0800, mike wrote:
   I did some more digging and found that our class imports a yacc.py
   that uses

   import re, types, sys, cStringIO, hashlib, os.path

   so it has hashlib.

   yacc.py seems to be an old version 1.3 ( I found 2.3 --).

   Reading about hashlib it seems to be dependent on os installation of
   OpenSSL but I cannot find out how.

  It shouldn't be. It will use OpenSSL if available, otherwise it will fall
  back on its own code.

   br,

   //mike

   yacc.py
   ===

  #-
   # ply: yacc.py

  [snip over TWO THOUSAND lines of code]

  Mike, what lead you to believe that an error in hashlib could be solved
  by posting the ENTIRE two thousand lines of yacc.py? Please do not post
  such huge chunks of code unless asked. It is unnecessary and annoying.

  Try this. Open a terminal window and enter python at the prompt to
  start a clean interactive session. Then enter the following commands:

  import sys
  print(sys.version)
  import hashlib
  print(hashlib.__file__)
  print(hashlib.md5)
  import _md5
  print(_md5.__file__)

  and copy and paste (do not retype) the full output of these commands.

  Thank you.

  --
  Steven

 Hi,

 Sorry for posting huge file. I added your copy-paste snippet.

 esekilx5030 [7:09am] [roamFroBl/pysibelius/bin] - python
 Python 2.7.2 (default, Jun 16 2011, 15:05:49)
 [GCC 4.5.0] on linux2
 Type help, copyright, credits or license for more information. 
 import sys

 print(sys.version)
 import hashlib
 print(hashlib.__file__)
 print(hashlib.md5)
 import _md5
 print(_md5.__file__)  2.7.2 (default, Jun 16 2011, 15:05:49)
 [GCC 4.5.0] ERROR:root:code for hash md5 was not found.

 Traceback (most recent call last):
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 139, in module
     globals()[__func_name] = __get_hash(__func_name)
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 91, in __get_builtin_constructor
     raise ValueError('unsupported hash type %s' % name)
 ValueError: unsupported hash type md5
 ERROR:root:code for hash sha1 was not found.
 Traceback (most recent call last):
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 139, in module
     globals()[__func_name] = __get_hash(__func_name)
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 91, in __get_builtin_constructor
     raise ValueError('unsupported hash type %s' % name)
 ValueError: unsupported hash type sha1
 ERROR:root:code for hash sha224 was not found.
 Traceback (most recent call last):
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 139, in module
     globals()[__func_name] = __get_hash(__func_name)
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 91, in __get_builtin_constructor
     raise ValueError('unsupported hash type %s' % name)
 ValueError: unsupported hash type sha224
 ERROR:root:code for hash sha256 was not found.
 Traceback (most recent call last):
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 139, in module
     globals()[__func_name] = __get_hash(__func_name)
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 91, in __get_builtin_constructor
     raise ValueError('unsupported hash type %s' % name)
 ValueError: unsupported hash type sha256
 ERROR:root:code for hash sha384 was not found.
 Traceback (most recent call last):
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 139, in module
     globals()[__func_name] = __get_hash(__func_name)
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 91, in __get_builtin_constructor
     raise ValueError('unsupported hash type %s' % name)
 ValueError: unsupported hash type sha384
 ERROR:root:code for hash sha512 was not found.
 Traceback (most recent call last):
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 139, in module
     globals()[__func_name] = __get_hash(__func_name)
   File /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/
 hashlib.py, line 91, in __get_builtin_constructor
     raise ValueError('unsupported hash type %s' % name)
 ValueError: unsupported hash type sha512 
 /vobs/rnc/rrt/roam1/roamSs/roamFroBl/python/lib/python2.7/hashlib.pyc
  Traceback (most recent call last):

   File stdin, line 1, in module
 AttributeError: 'module' object has no attribute 'md5' Traceback (most 
 recent call last):

   File stdin, line 1, in module
 ImportError: No module named _md5

 Thanks for support!

 //mike

Hi,

I did some more testing.

The python 2.7.2 lib is stored