Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

ib.connect gives bunch of errors (too many values to unpack) #523

Closed
ivobb opened this issue Nov 9, 2022 · 1 comment
Closed

ib.connect gives bunch of errors (too many values to unpack) #523

ivobb opened this issue Nov 9, 2022 · 1 comment

Comments

@ivobb
Copy link

ivobb commented Nov 9, 2022

HI,

from ib_insync import *
ib = IB()
ib.connect('127.0.0.1', 7497, clientId=1)
ib.disconnect()

I get the following output after which the script continues.
using something like a=ib.connect('127.0.0.1', 7497, clientId=1) doesn't change anything.

This did not happen before. Any clue?

Regards,
Ivo

ValueError: too many values to unpack (expected 15)
Error handling fields: ['101', '533620577', 'MYM', 'FUT', '20221216', '0', '?', '0.5', 'ECBOT', 'USD', 'MYM  DEC 22', 'MYM', 'SELL', '0', 'STP', '0.0', '32849.0', 'DAY', '1580482311', 'DU3853587', '', '0', '', '1580482313', '1', '0', '0', '', '', '', '', '', '', '', '0', '', '', '0', '', '-1', '', '', '', '', '', '2147483647', '0', '0', '', '3', '0', '', '0', 'None', '', '0', '0', '0', '', '0', '0', '', '', '', '0', '0', '0', '2147483647', '2147483647', '', '', '', 'IB', '0', '0', '', '0', 'Fill
ed', '0', '0', '0', '32849.0', '1.7976931348623157E308', '0', '1', '0', '', '1', '2147483647', '0', 'Not an insider or substantial shareholder', '0', '0', '1580482311', '20221109 12:12:10 US/Eastern', 'Filled Size: 1', '', '', '', '', '']
Traceback (most recent call last):
  File "C:\Users\Ivo\AppData\Local\Programs\Python\Python310\lib\site-packages\ib_insync\decoder.py", line 197, in interpret
    handler(fields)
  File "C:\Users\Ivo\AppData\Local\Programs\Python\Python310\lib\site-packages\ib_insync\decoder.py", line 1255, in completedOrder
    (
ValueError: too many values to unpack (expected 15)
Error handling fields: ['101', '533620577', 'MYM', 'FUT', '20221216', '0', '?', '0.5', 'ECBOT', 'USD', 'MYM  DEC 22', 'MYM', 'SELL', '0', 'LMT', '32887.0', '0.0', 'GTD', '', 'DU3853587', '', '0', '', '1580482294', '0', '0', '0', '', '', '', '', '', '', '20221109 12:05:22 US/Eastern', '0', '', '', '0', '', '-1', '', '', '', '', '', '2147483647', '0', '0', '', '3', '0', '', '0', 'None', '', '0', '0', '0', '', '0', '0', '', '', '', '0', '0', '0', '2147483647', '2147483647', '', '', '', 'IB', '0', '0', '', '0', 'Filled', '0', '0', '0', '1.7976931348623157E308', '1.7976931348623157E308', '0', '1', '0', '', '1', '2147483647', '0', 'Not an insider or substantial shareholder', '0', '0', '0', '20221109 11:05:25 US/Eastern', 'Filled Size: 1', '', '', '', '', '']
Traceback (most recent call last):
  File "C:\Users\Ivo\AppData\Local\Programs\Python\Python310\lib\site-packages\ib_insync\decoder.py", line 197, in interpret
    handler(fields)
  File "C:\Users\Ivo\AppData\Local\Programs\Python\Python310\lib\site-packages\ib_insync\decoder.py", line 1255, in completedOrder
    (
ValueError: too many values to unpack (expected 15)
Error handling fields: ['101', '533620577', 'MYM', 'FUT', '20221216', '0', '?', '0.5', 'ECBOT', 'USD', 'MYM  DEC 22', 'MYM', 'BUY', '1', 'LMT', '32689.0', '0.0', 'DAY', '1580482294', 'DU3853587', '', '0', '', '1580482295', '0', '0', '0', '', '', '', '', '', '', '', '0', '', '', '0', '', '-1', '', '', '', '', '', '2147483647', '0', '0', '', '3', '0', '', '0', 'None', '', '0', '0', '0', '', '0', '0', '', '', '', '0', '0', '0', '2147483647', '2147483647', '', '', '', 'IB', '0', '0', '', '0', 'Cancelled', '0', '0', '0', '1.7976931348623157E308', '1.7976931348623157E308', '0', '1', '0', '', '0', '2147483647', '0', 'Not an insider or substantial shareholder', '0', '0', '1580482294', '20221109 11:05:36 US/Eastern', 'Cancelled by System:\n', '', '', '', '', '']

@erdewit erdewit closed this as completed in e80f8fc Nov 9, 2022
@erdewit
Copy link
Owner

erdewit commented Nov 9, 2022

Thanks for the bug report. This was a bug in the completedOrder parsing in combination with newer TWS versions. It is fixed in v0.9.73.

flepied pushed a commit to flepied/ib_insync that referenced this issue Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants