OSError: Could not find a suitable TLS CA certificate bundle, invalid path

I’m trying to connect to my authentication server using my SSL certification via requets module. To get this I imported my own certifictae .pem and I’m trying to use it to access my server.

Unfortunately I’m getting this error:

OSError: Could not find a suitable TLS CA certificate bundle, invalid path: C:\Main\Python\Certs\server.pem

It’s saying the path is invalid. Silly question, but is the file actually there in that folder with that name?

Yes, the path is not a problem… It seems related with requests library. But not sure…There is a thread here but not clear the solution:

Maybe requests library only accepts the cacert.pem that is a bundle of CA certificates instead of accepting my own certificate server.pem

Finally fixed.
Problem was about the format. In windows the cert.pem was added the type crt.
Finally used this code:

response = requests.get(‘https://server-path’, headers=headers, verify=‘./server.pem.crt’)