Надеюсь, кто-нибудь мне поможет. Я новичок в программировании на Python, я загрузил образец API eTrade и пытаюсь запустить его, и получаю эту ошибку. Я также пробовал это на C# и VB.NET, но безуспешно.
Exception has occurred: ConnectionError
('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
During handling of the above exception, another exception occurred:
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
During handling of the above exception, another exception occurred:
File "C:\Users\kg5fc\Downloads\Bots\etrade_python_client.py", line 63, in oauth
request_token, request_token_secret = etrade.get_request_token(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\kg5fc\Downloads\Bots\etrade_python_client.py", line 111, in
oauth()
Фрагмент кода, в котором обнаружена ошибка (последние 2 строки):
Надеюсь, кто-нибудь мне поможет. Я новичок в программировании на Python, я загрузил образец API eTrade и пытаюсь запустить его, и получаю эту ошибку. Я также пробовал это на C# и VB.NET, но безуспешно. [code]Exception has occurred: ConnectionError ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)) ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
During handling of the above exception, another exception occurred:
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
During handling of the above exception, another exception occurred:
File "C:\Users\kg5fc\Downloads\Bots\etrade_python_client.py", line 63, in oauth request_token, request_token_secret = etrade.get_request_token( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\kg5fc\Downloads\Bots\etrade_python_client.py", line 111, in oauth() [/code] Фрагмент кода, в котором обнаружена ошибка (последние 2 строки): [code]"""This Python script provides examples on using the E*TRADE API endpoints""" from __future__ import print_function import webbrowser import json import logging import configparser import sys import requests from rauth import OAuth1Service from logging.handlers import RotatingFileHandler from accounts.accounts import Accounts from market.market import Market
# Step 1: Get OAuth 1 request token and secret request_token, request_token_secret = etrade.get_request_token( params={"oauth_callback": "oob", "format": "json"}) [/code] Я использовал Google, ChatGPT и все, что мог придумать, чтобы найти решение.