I have a script that can be ran with alert, but if I run the script manually, the following error will showed. Any idea how I can run it manually?
I have add the python location in first line.
[root@hostname scripts]# ./REST_1.py ERROR:root:code for hash sha1 was not found. Traceback (most recent call last): File "/data/splunk/lib/python2.7/hashlib.py", line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File "/data/splunk/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha1 Traceback (most recent call last): File "./REST_1.py", line 7, in <module> import requests File "/data/splunk/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module> from . import utils File "/data/splunk/lib/python2.7/site-packages/requests/utils.py", line 25, in <module> from .compat import parse_http_list as _parse_list_header File "/data/splunk/lib/python2.7/site-packages/requests/compat.py", line 7, in <module> from .packages import chardet File "/data/splunk/lib/python2.7/site-packages/requests/packages/__init__.py", line 3, in <module> from . import urllib3 File "/data/splunk/lib/python2.7/site-packages/requests/packages/urllib3/__init__.py", line 16, in <module> from .connectionpool import ( File "/data/splunk/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 36, in <module> from .connection import ( File "/data/splunk/lib/python2.7/site-packages/requests/packages/urllib3/connection.py", line 43, in <module> from .util import ( File "/data/splunk/lib/python2.7/site-packages/requests/packages/urllib3/util/__init__.py", line 10, in <module> from .ssl_ import ( File "/data/splunk/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py", line 2, in <module> from hashlib import md5, sha1 ImportError: cannot import name sha1