3

For the first time I am using the simple_salesforce package in python to connect to salesforce cloud. Using the following code:

import os 
import zipfile
import requests
import subprocess
from datetime import datetime
from bs4 import BeautifulSoup as BS
from simple_salesforce import Salesforce
sf = Salesforce(
    username='<user name>',
    password='<password>',
    security_token='<session Id>'
)

I am getting the following error after executing the same.

*SSLError: HTTPSConnectionPool(host='login.salesforce.com', port=443): Max retries exceeded with url: /services/Soap/u/38.0 (Caused by SSLError(SSLError("bad handshake: SysCallError(10054, 'WSAECONNRESET')",),))*


Can some one please help me on this. i am using spyder UI here to code.

Thank you

davejagoda
  • 2,420
  • 1
  • 20
  • 27
bivin
  • 31
  • 4
  • Is your security_token correct? Also, could it be a firewall or network proxy error? If you're at work you might need to them to create a bypass for Salesforce or you might need to install the cert on your computer and reference that. – Dan Jan 22 '19 at 11:00
  • Noted, i will try once i am out of network to validate this... will keep this link posted. – bivin Jan 22 '19 at 11:06
  • hi i have tried to connect, its saying the token or username or password is invalid. The details provided are correct and still i am getting this error. SalesforceAuthenticationFailed: INVALID_LOGIN: Invalid username, password, security token; or user locked out. – bivin Jan 22 '19 at 12:01
  • Then it sounds like you have both problems maybe. Your work network is blocking your https traffic AND you have the wrong credentials. No one here can help you on that I don't think. – Dan Jan 22 '19 at 12:04
  • I noticed you don't have a `organizationId` parameter entered. Is this an error in your posting or is it correct in your actual code? You can also check your **Session Settings** to see if anything there might be blocking your connection (i.e. restricted IP ranges) – Jwok Mar 01 '19 at 21:09

0 Answers0