Case 1:
We could see cases where users come across the below error when trying to execute scripts. This happens if the requests library is not imported.
In order to import the requests library in Python, follow the steps below:
1. Open cmd as admin and execute the below command.
pip --version
If pip is already installed, you will see a message like the below about the pip version.
2. Executing the below command in command prompt will show the python version.
python -V
3. If you have pip as mentioned in step 1, go ahead and import the requests library in python. Execute the below command in cmd.
python -m pip install requests
4. Once the requests library is imported, go ahead with executing the script.
Case 2:
Some users try to run scripts on a test server and they might experience the below error. This happens if there isn't a proper certificate installed.
In such cases, the ssl error can be ignored by mentioning the exception in the script file.
Below is a sample script (add_notes_MSP.py) which adds note to requests to satisfy first response based on the criteria in the custom trigger.
Adding the below exception in the script would exclude the ssl error and runs the script properly.
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)