question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I am getting the following SSL erros when trying to access my internal SP site… Any ideas??

from shareplum import Site
from requests_ntlm import HttpNtlmAuth

cred = HttpNtlmAuth('domain\vennem', 'PASSWORD')
site = Site('https://sharepoint.domain.local/admin', verify_ssl=True, auth= None, ssl_version='TLSv1')
sp_list = site.List('SharePoint Business Owners and POCs')

File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\contrib\pyopenssl.py”, line 444, in wrap_socket cnx.do_handshake() File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\OpenSSL\SSL.py”, line 1915, in do_handshake self._raise_ssl_error(self._ssl, result) File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\OpenSSL\SSL.py”, line 1647, in _raise_ssl_error _raise_current_error() File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\OpenSSL_util.py”, line 54, in exception_from_error_queue raise exception_type(errors) OpenSSL.SSL.Error: [(‘SSL routines’, ‘tls_process_server_certificate’, ‘certificate verify failed’)]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py”, line 600, in urlopen chunked=chunked) File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py”, line 343, in _make_request self._validate_conn(conn) File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py”, line 849, in validate_conn conn.connect() File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connection.py”, line 356, in connect ssl_context=context) File "C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\util\ssl.py", line 359, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\contrib\pyopenssl.py”, line 450, in wrap_socket raise ssl.SSLError(‘bad handshake: %r’ % e) ssl.SSLError: (“bad handshake: Error([(‘SSL routines’, ‘tls_process_server_certificate’, ‘certificate verify failed’)])”,)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\adapters.py”, line 449, in send timeout=timeout File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\connectionpool.py”, line 638, in urlopen _stacktrace=sys.exc_info()[2]) File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\urllib3\util\retry.py”, line 398, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘sharepoint.cfpb.local’, port=443): Max retries exceeded with url: /admin/_vti_bin/lists.asmx (Caused by SSLError(SSLError(“bad handshake: Error([(‘SSL routines’, ‘tls_process_server_certificate’, ‘certificate verify failed’)])”)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “C:/Users/vennem/untitled/venv/Scripts/sharepointlist.py”, line 7, in <module> site = Site(‘https://sharepoint.cfpb.local/admin’, verify_ssl=True, auth= None, ssl_version=‘TLSv1’) File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\shareplum\shareplum.py”, line 128, in init self.users = self.GetUsers() File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\shareplum\shareplum.py”, line 277, in GetUsers timeout=self.timeout) File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\sessions.py”, line 581, in post return self.request(‘POST’, url, data=data, json=json, **kwargs) File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\sessions.py”, line 533, in request resp = self.send(prep, **send_kwargs) File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\sessions.py”, line 646, in send r = adapter.send(request, **kwargs) File “C:\Users\vennem\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\adapters.py”, line 514, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host=‘sharepoint.cfpb.local’, port=443): Max retries exceeded with url: /admin/_vti_bin/lists.asmx (Caused by SSLError(SSLError(“bad handshake: Error([(‘SSL routines’, ‘tls_process_server_certificate’, ‘certificate verify failed’)])”)))

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
vennempcommented, Mar 26, 2019

I figured it out… i had to add next(readcsv) to skip the headers of the csv, since the field in SharePoint was a person field, it was failing because “Primary POC” wasn’t a valid person name.

Thank you so much for help guys!

1reaction
vennempcommented, Mar 26, 2019

Just ran it with the following and still go the UserInfoList error…

site = Site(‘https://sharepoint.cfpb.local/admin’, verify_ssl=False, auth= cred)

I figured it out… I was including the domain in my user name domain\vennem and the backslash was escaping the V.

changed itt o domain\vennem and it worked … THANK YOU FOR THE HELP

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Do SSL Certificate Errors Mean: Causes & How to Fix ...
An SSL certificate error occurs when the browser cannot verify the SSL certificates returned by the server. When the error happens, ...
Read more >
SSL errors – common codes and messages - Paessler
The SSL error is caused by a problem with the root certificate. When you use client SSL and make a request for a...
Read more >
8 Ways to Fix SSL Connection Errors on Various Browsers ...
In broad terms, SSL connection errors will prevent you from browsing a website securely over Hypertext Transfer Protocol Secure (HTTPS). Your ...
Read more >
What Does SSL Connection Error Mean and How to Fix It
Having SSL connection error on your website leads to loss of visitors and reduced sales numbers. Read on to learn what it is...
Read more >
What is an SSL certificate and How to fix SSL Errors?
An SSL certificate error results from an issue with the website's certificate itself or its configuration on the server. If your browser is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found