Closed lvxhnat closed 2 weeks ago
You are invoking something called IBC
, presumably from your Python code.
But there is nothing in the IBC code base called IBC
. What actually starts IBC is a Bash script called ibcstart.sh
.
Clearly this thing called IBC
is actually managing to start IBC, because the message at the end is output by IBC when Gateway doesn't behave properly. So presumably the thing called IBC
is itself invoking ibcstart.sh
. but I have no idea what that thing is or where it is or what else it does.
In other words, your problem is not an IBC issue: you need to discuss this with whoever now maintains ib-insync.
@rlktradewright Thank you for your quick reply. I am trying to use the script twsstartmacos.sh
instead now to start, instead of depending on ibcstart.sh. I am running
# After sudo chmod o+x *.sh */*.sh the contents of the /opt/ibc folder
# In /opt/ibc
sh twsstartmacos.sh
however, when i do so, it simply returns me
tab 1 of window id 169
and nothing happens (tws is not logged in). i have configured my username and password in ~/ibc/config.ini
and the one in /opt/ibc
but neither works. any idea what is causing this issue?
twsstartmacos.sh
is a Bash script, so you need to make sure you're running it with Bash. I beleieve the default shell on macOS is NOT Bash.
So try:
bash twsstartmacos
@rlktradewright Thanks for the quick reply. I did try bash twsstartmacos.sh
but i am getting the same output tab 1 of window id 200
. Where can i start debugging this?
Ok, let's try and suggest some things. But let me say right from the start that I don't have access to a mac, so there's nothing I can do directly.
Note that IBC does work fine on macs, There's no doubt about this. So what is causing the problem mut be something about the context or environment you're trying to run it in.
And the error mesage in your first post shows that IBC does indeed run when started from your Python code. IBC produces that message exactly when it says, ie Gateway has been started but has failed to display the login dialog within the relevant timeout (as specified in the LoginDialogDisplayTimeout=60
setting in config.ini). Presumably the reason it failed to do so is something to do with the Java exception report: I have absolutely no idea what that means or what is the cause., butiti's nothing to do with IBC.
So when you run from your original code using ib-insync, clearly something about the Java environment is incorrect: that's nothing to do with me, which is why I suggested you get help from the ib-insync community.
Next, you try running twsstartmacos.sh directly, and you get the message tab 1 of window id nnn
. My understanding is that the terminal issues this message when something is started in a tab, But you say 'nothing happens (tws is not logged in)', but something must be happening in that tab. What should happen is that the subscript displaybannerandlaunch.sh
runs within the terminal, and this displays some information and then invokes ibcstart.sh
, which in turn runs IBC which then runs TWS
So if nothing seems to be happening, you'll need to do something like add echo
statements to the scripts to see what they're doing.
I don't really know what more I can say.
Except to make the suggestion that you start again from scratch and follow the instructions in the User Guide for installing IBC, and try running that (so no use of ib-insync) just to convince yourself that it does work.
I am trying to run IBC using ib-insync, this is the code:
ibc is installed in
/opt/ibc
and gateway in~/Applications
. I am unfamiliar to Java, where can I start to debug this issue, or what is the cause of this in the first place?