IBrgidge PY import error

when running RUN_ME i get: ImportError: cannot import name 'IBCpp' from 'IBridgePy'

using the ibrgdepy 37 for python 3.7 with anaconda spyder(python 3.7)



please help 

Hi George,



Please follow these steps, from the IBridgePy help page :

  1. Check if the correct IBridgePy version has been downloaded. (It solves most of the issues)
  2. Make sure that Anaconda is used if you are using Windows.
  3. Check if multiple Python versions have been installed. If yes, uninstall the unused python version. Or, execute RUN_ME.py using the correct Python.
If that still does not wor, please share a screenshot of the error along with the screenshot of environment details (OS name/version, Python name/version, IBridgePy version)

Hope this helps!

Hi Gaurav, 

thank you for the prompt reply 

It worked but just once . I get the situation of my account but when i run run_me again i get broker_client_factory.CallBacks:errorId=-1 errorCode=502 errorMessage=Couldn't connect to TWS.  Confirm that "Enable ActiveX and Socket Clients" is enabled on the TWS "Configure->API" menu.

broker_client_factory.CallBacks:EXIT IBridgePy version= 11.1.4



The activex is enabled and port is as stated in bridgepy

Hi George,



I could not replicate the issue at my end. Could you please try again and share screenshots of your application window, before and after the error. Please include the global configuration page / API Settings too. 

Thanks!

Hi Gaurav , 

the error is : 



broker_client_factory.CallBacks:errorId=-1 errorCode=502 errorMessage=Couldn't connect to TWS.  Confirm that "Enable ActiveX and Socket Clients" is enabled on the TWS "Configure->API" menu.

broker_client_factory.CallBacks:EXIT IBridgePy version= 11.1.4



In IBK platfrom 

1.ENABLE ACTIVEX and sockets clients is clicked

2.read-only API unclicked

3. socket port 7496 * tried both 7947 same error message as above 

please see screenshot of IBK:

Hi George, 

Please check the steps here



Let me know how this works out!