cURL works find without any issues connecting from the Linux server while connection through the ks python api wrapper.
Error:
urllib3.connectionpool- Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5d16434880>: Failed to establish a new connection: [Errno 110] Connection timed out')':
test code:
.................
from ks_api_client import ks_api
import config #usercredentials
access_token = config.access_token
user_id = config.user_id
app_id = config.app_id
password = config.password
consumer_key = config.consumer_key
access_code = config.access_code
client = ks_api.KSTradeApi(access_token = access_token, userid = user_id, \
consumer_key = consumer_key, ip = "127.0.0.1", app_id = app_id)
client.login(password = password)
print(client.session_2fa(access_code = access_code))
...................
code does work fine from my local machine. To replicate try from any Linux cloud Server(linode)
cURL works find without any issues connecting from the Linux server while connection through the ks python api wrapper.
Error: urllib3.connectionpool- Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5d16434880>: Failed to establish a new connection: [Errno 110] Connection timed out')':
test code: ................. from ks_api_client import ks_api import config #usercredentials access_token = config.access_token user_id = config.user_id app_id = config.app_id password = config.password consumer_key = config.consumer_key access_code = config.access_code client = ks_api.KSTradeApi(access_token = access_token, userid = user_id, \ consumer_key = consumer_key, ip = "127.0.0.1", app_id = app_id) client.login(password = password) print(client.session_2fa(access_code = access_code)) ................... code does work fine from my local machine. To replicate try from any Linux cloud Server(linode)