Could not find a suitable TLS CA certificate bundle,

477 views
Skip to first unread message

shruti patil

unread,
Jun 19, 2023, 4:52:32 PM6/19/23
to robotframework-users
Hello people out there,
i am getting OSError: Could not find a suitable TLS CA certificate bundle, invalid path: C:\Users\shpatil.qalab\New folder.pem in pycharm.
although my path is correct and i am pasting my code here, please someone look into it.
and help.

*** Settings ***
Documentation All Test cases related to NES api
Library RequestsLibrary
Force Tags API
Library Collections
Library OperatingSystem


*** Test Cases ***
Login to NES by Token
[Documentation] This test case will login to NES by BasicLoginWithToken
...
... TestRail: https://nymi.testrail.net/index.php?/cases/view/201568&group_by=cases:section_id&group_id=27003&group_order=asc&display_deleted_cases=0
[Tags] C201568
#Run Keyword And Ignore Error Suppress Insecure Request Warning
#${cert_params}= Create Dictionary verify=${CERTIFICATE_PATH}
#Set Library Search Order Collections OperatingSystem RequestsLibrary
#Filter Warnings ignore::urllib3.exceptions.InsecureRequestWarning
Set Environment Variable REQUESTS_CA_BUNDLE ${CERTIFICATE_PATH}
Create Session API_NES_Basic_Auth ${NES_Link} verify=${CERTIFICATE_PATH}
${headers}= Create Dictionary Content-Type=application/json
${payload}= Create Dictionary Username=nesadmin Password=9ym1@123$
${response}= POST On Session API_NES_Basic_Auth /BasicLoginWithToken headers=${headers} json=${payload}
Should Be Equal As Strings ${response.status_code} 200
Should Contain ${response.json()} Expected value

*** Keywords ***
Sign in to NES
Create Session Chrome ${NES_Link}
Suppress Insecure Request Warning
${is_secure} = Run Keyword And Return Status Evaluate sys.modules.get('requests') is not None
Run Keyword If ${is_secure} Suppress Warnings

Suppress Warnings
[Documentation] Suppresses the InsecureRequestWarning
[Tags] setup
Run Keyword Evaluate import warnings; warnings.filterwarnings("ignore", category=InsecureRequestWarning)

*** Variables ***
${NES_Link} https://nes.qalab.nymi.com/npm554/api
${CERTIFICATE_PATH} C:\\Users\\shpatil.qalab\\New folder.pem

Dayananda Rangadamappa

unread,
Jun 19, 2023, 9:37:05 PM6/19/23
to shruti patil, robotframework-users
Hi Shruti,

You need to escape space character which is present between New and folder.pem file or rename New folder.pem as New_folder.pem. That should solve the problem.


Regards,
Dayananda D R


--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/c1a7aaa6-20a0-4e67-bac9-38c485bc5226n%40googlegroups.com.

deep kiran

unread,
Jun 21, 2023, 1:29:16 PM6/21/23
to robotframework-users
change the 'new folder' name to 'newfolder'
Reply all
Reply to author
Forward
0 new messages