开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

unexpected keyword argument 'conid' in Contract()


 

In the there is an example:?
Contract(conId=270639)
which should return a Contract Object. But I got the error:
Traceback (most recent call last):
? File "...\venv\lib\site-packages\IPython\core\interactiveshell.py", line 3577, in run_code
? ? exec(code_obj, self.user_global_ns, self.user_ns)
? File "<ipython-input-23-8d88e504d067>", line 1, in <module>
? ? Contract(conid=270639)
TypeError: Contract.__init__() got an unexpected keyword argument 'conid'

In the source:
...
@staticmethod
def create(**kwargs) -> "Contract":
"""
Create and a return a specialized contract based on the given secType,
or a general Contract if secType is not given.
"""
...
is no conId.

I thought if I have a conId, I dont need any further Contract description.

Am I wrong or is it a bug?

Regards
Hans

Join [email protected] to automatically receive all group messages.