Python意外的关键字参数';内构造函数调用
你好,提前谢谢你的帮助。我不是Python专家,而是精通其他语言的程序员 我在“服务器是否正在运行”上遇到错误 客户Python意外的关键字参数';内构造函数调用,python,class,constructor,arguments,keyword,Python,Class,Constructor,Arguments,Keyword,你好,提前谢谢你的帮助。我不是Python专家,而是精通其他语言的程序员 我在“服务器是否正在运行”上遇到错误 客户 from ibw.client import IBClient REGULAR_USERNAME = 'MY_ACCOUNT_USERNAME' REGULAR_ACCOUNT = 'MY_ACCOUNT_NUMBER' # Create a new session of the IB Web API. ib_client = IBClient(username=REGULA
from ibw.client import IBClient
REGULAR_USERNAME = 'MY_ACCOUNT_USERNAME'
REGULAR_ACCOUNT = 'MY_ACCOUNT_NUMBER'
# Create a new session of the IB Web API.
ib_client = IBClient(username=REGULAR_USERNAME,
account=REGULAR_ACCOUNT,
client_gateway_path=None,
is_server_running=True)
你安装了这个软件包吗?可能是您的示例代码现在已经过时了,看看github,它是在9月5日更新的。它似乎不再有“正在运行的服务器”,我昨天克隆了它。如果我在github上查看client.py,它仍然有类IBClient()def uuuu init uuuuuuuuself(self,用户名:str,帐户:str,客户端\网关\路径:str=None,服务器\运行:bool=True)->None:
class IBClient():
def __init__(self, username: str, account: str, client_gateway_path: str = None, is_server_running:
bool = True) -> None
self.account = account
self.username = username
self.client_gateway_path = client_gateway_path
self.client_portal_client = ClientPortal()
self.api_version = 'v1/'
self._operating_system = sys.platform
self.session_state_path: pathlib.Path =
pathlib.Path(__file__).parent.joinpath('server_session.json').resolve()
self.authenticated = False
self._is_server_running = is_server_running
# Define URL Components
ib_gateway_host = r"https://localhost"
ib_gateway_port = r"5000"
self.ib_gateway_path = ib_gateway_host + ":" + ib_gateway_port
self.backup_gateway_path = r"https://cdcdyn.interactivebrokers.com/portal.proxy"
self.login_gateway_path = self.ib_gateway_path + "/sso/Login?forwardTo=22&RL=1&ip2loc=on"
[more code]
Again thanks in advance for your help
Bob