Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection timing out from linux(ubuntu) server while cURL works fine from the same server. #72

Open
youngking1686 opened this issue Dec 30, 2021 · 0 comments

Comments

@youngking1686
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant