(vi_3.3)[merret@centos]$ python modify_single_pid.py -v
2020-09-04 21:35:17,948 - __main__ - INFO - Will modify this handle: 21.14101/TESTTESTTEST
2020-09-04 21:35:17,948 - __main__ - INFO - Handle record will contain these values: {'TEST': 'TRUEE', 'SOMEFLAG': 'HIHI', 'CREATED': '20200904', 'DESCRIPTION': 'Apple pie', 'CONTACT': 'buurman@dkrz.de', 'DELETEME': 'DO IT'}
Traceback (most recent call last):
File "modify_single_pid.py", line 137, in <module>
creds, HTTPS_verify=https_verify)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/pyhandle/handleclient.py", line 68, in instantiate_with_credentials
return self.handle_client.instantiate_with_credentials(credentials, **config)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/pyhandle/client/resthandleclient.py", line 243, in instantiate_with_credentials
inst = RESTHandleClient(**key_value_pairs)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/pyhandle/client/resthandleclient.py", line 110, in __init__
self.__handlesystemconnector = HandleSystemConnector(handleclient=self, **args)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/pyhandle/handlesystemconnector.py", line 83, in __init__
self.__setup_for_writeaccess(args)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/pyhandle/handlesystemconnector.py", line 164, in __setup_for_writeaccess
self.__setup_for_auth_by_user_and_pw()
File "/home/merret/vi_3.3/lib/python3.3/site-packages/pyhandle/handlesystemconnector.py", line 177, in __setup_for_auth_by_user_and_pw
self.check_if_username_exists(self.__username)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/pyhandle/handlesystemconnector.py", line 463, in check_if_username_exists
resp = self.send_handle_get_request(handle)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/pyhandle/handlesystemconnector.py", line 278, in send_handle_get_request
resp = self.__session.get(url, headers=head, verify=veri)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/requests/sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/home/merret/vi_3.3/lib/python3.3/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/home/merret/vi_3.3/lib/python3.3/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/home/merret/vi_3.3/lib/python3.3/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
conn.connect()
File "/home/merret/vi_3.3/lib/python3.3/site-packages/urllib3/connection.py", line 371, in connect
ssl_context=context,
File "/home/merret/vi_3.3/lib/python3.3/site-packages/urllib3/util/ssl_.py", line 350, in ssl_wrap_socket
context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
TypeError: load_verify_locations() takes at most 2 arguments (3 given)
Using the same script in python2, all I get is this:
Traceback (most recent call last):
File "modify_single_pid.py", line 137, in <module>
creds, HTTPS_verify=https_verify)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/pyhandle/handleclient.py", line 68, in instantiate_with_credentials
return self.handle_client.instantiate_with_credentials(credentials, **config)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/pyhandle/client/resthandleclient.py", line 243, in instantiate_with_credentials
inst = RESTHandleClient(**key_value_pairs)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/pyhandle/client/resthandleclient.py", line 110, in __init__
self.__handlesystemconnector = HandleSystemConnector(handleclient=self, **args)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/pyhandle/handlesystemconnector.py", line 83, in __init__
self.__setup_for_writeaccess(args)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/pyhandle/handlesystemconnector.py", line 164, in __setup_for_writeaccess
self.__setup_for_auth_by_user_and_pw()
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/pyhandle/handlesystemconnector.py", line 177, in __setup_for_auth_by_user_and_pw
self.check_if_username_exists(self.__username)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/pyhandle/handlesystemconnector.py", line 463, in check_if_username_exists
resp = self.send_handle_get_request(handle)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/pyhandle/handlesystemconnector.py", line 278, in send_handle_get_request
resp = self.__session.get(url, headers=head, verify=veri)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/requests/sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/home/merret/work/githubrepos/ESGF/fixerscript/handletools/cmip6tools/venv2/lib/python2.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='pid1.dkrz.de', port=8001): Max retries exceeded with url: /api/handles/21.14101/ADMINLIST (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)'),))
When using http_verify=True in python2, I get
Using the same script in python2, all I get is this: