You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
I got a very strange issue the past week or two. I have problem connecting to IB using ib_insync on a Mac, but without any problem on a PC. Below are some details:
The ib_insync code I ran is simple, and the same across systems. The setup for TWS seems to have no issue.
import ib_insync as ibis
ib = ibis.IB()
ib.connect('127.0.0.1', 7497, clientId=1)
Once I ran these three lines on a Mac, the Spyder console keeps running without any error message. I have two Macs, both having the same issue. I have no problem connecting to IB on a PC using this code.
I have no issue to connect to IB using IB's own code. That is,
from ibapi.client import EClient
from ibapi.wrapper import EWrapper
class MyWrapper(EWrapper):
def init(self):
super().init()
wrapper = MyWrapper()
client = EClient(wrapper)
client.connect("127.0.0.1", 7497, clientId=1)
client.run()
However, when I ran the ib_insync code above after this, it freezes again. When I restart the kernel, the IB code no longer works, unless I restart the TWS and re login.
The ib_insync connect code ran OK about a week ago on one Mac. Then all of a sudden, it stopped working.
Does anyone have a clue about this issue? Many thanks.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I got a very strange issue the past week or two. I have problem connecting to IB using ib_insync on a Mac, but without any problem on a PC. Below are some details:
import ib_insync as ibis
ib = ibis.IB()
ib.connect('127.0.0.1', 7497, clientId=1)
Once I ran these three lines on a Mac, the Spyder console keeps running without any error message. I have two Macs, both having the same issue. I have no problem connecting to IB on a PC using this code.
from ibapi.client import EClient
from ibapi.wrapper import EWrapper
class MyWrapper(EWrapper):
def init(self):
super().init()
wrapper = MyWrapper()
client = EClient(wrapper)
client.connect("127.0.0.1", 7497, clientId=1)
client.run()
However, when I ran the ib_insync code above after this, it freezes again. When I restart the kernel, the IB code no longer works, unless I restart the TWS and re login.
Does anyone have a clue about this issue? Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions