0

I am trying to run a python script on a linux box with a specific version of python and I'm having some trouble. Every time I try to run the script on the linux box I get the traceback pasted below. The box has an Isilon storage system mounted where the script is stored. When I try to run the script on the head node of the Isilon, it runs fine. I can't figure out what would be different between the two systems, because I am using the same version of python in both places. To make it even more confusing, some of the linux boxes run the script just fine. All the linux boxes seemingly have the same version everything, I installed all the software at the same time from the same disk. Any feedback would be greatly appreciated. I'm happy to provide more explanation if necessary, I'm sure this is confusing.

I replaced the full path the scripts with "PATH".

ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "PATH/libexec/python/lib/python2.7/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "PATH/libexec/python/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "diskLoader/DiskLoaderMonitoring.py", line 12, in <module>
    from WasabiClient import WasabiClient
  File "PATH/lib/WasabiClient.py", line 13, in <module>
    from ServiceClient import ServiceClient
  File "PATH/lib/ServiceClient.py", line 6, in <module>
    import requests
  File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/__init__.py", line 58, in <module>
    from . import utils
  File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/utils.py", line 23, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/compat.py", line 7, in <module>
    from .packages import charade as chardet
  File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/packages/__init__.py", line 3, in <module>
    from . import urllib3
  File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/packages/urllib3/__init__.py", line 16, in <module>
    from .connectionpool import (
  File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/packages/urllib3/connectionpool.py", line 60, in <module>
    from .response import HTTPResponse
  File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/packages/urllib3/response.py", line 14, in <module>
    from .util import is_fp_closed
  File "PATH/libexec/python/lib/python2.7/site-packages/requests-2.0.0-py2.7.egg/requests/packages/urllib3/util.py", line 11, in <module>
    from hashlib import md5, sha1
ImportError: cannot import name md5
Greg
  • 237
  • 2
  • 11
  • Have you looked at this: http://stackoverflow.com/questions/20399331/error-importing-hashlib-with-python-2-7-but-not-with-2-6 – dano Sep 29 '14 at 16:54
  • Thank you! I had seen that but I hadn't tried the solution on the bottom. This is the one that worked: `cp /usr/lib/python2.7/lib-dynload/_hashlib.so /path-to-virtenv/manager/lib/python2.7/lib-dynload/_hashlib.so` – Greg Sep 29 '14 at 17:59
  • Actually this only partially solved my problem. Now it works on the linux boxes but not the head node. – Greg Sep 29 '14 at 18:08

0 Answers0