Coder Social home page Coder Social logo

Comments (11)

erdewit avatar erdewit commented on May 25, 2024

If this is on Windows then it is a known issue with reconnecting; The tws_async_windows.py script bypasses the issue.

from tws_async.

sleepykid avatar sleepykid commented on May 25, 2024

on mac osx El Capitan

from tws_async.

sleepykid avatar sleepykid commented on May 25, 2024

I also tried the tws_async_windows.py but also same log error in IB Gateway and console message:
<_SelectorSocketTransport fd=89 read=idle write=<idle, bufsize=0>>
Connection lost None <_SelectorSocketTransport closing fd=89 read=idle write=<idle, bufsize=0>>

from tws_async.

erdewit avatar erdewit commented on May 25, 2024

Try with a different clientId.

from tws_async.

sleepykid avatar sleepykid commented on May 25, 2024

same issue, I also did run the pip install --upgrade PyQt5 quamash
(running python 3.6)

from tws_async.

erdewit avatar erdewit commented on May 25, 2024

Can you restart the gateway?

from tws_async.

herrold avatar herrold commented on May 25, 2024

I took this message from the initial report:
Ignoring API request 'jextend.a1' since API is not accepted.

to indicate that either the API was not enabled, or that a connection was being attempted from other than the localhost, and so the initial connection was failing

from tws_async.

sleepykid avatar sleepykid commented on May 25, 2024

ok,
I re-started and it still doesn't work. ( IB Gateway 964 )
in the IB Gateway log, it is
Server version 120
Client version 120

Definitely using localhost:
tws.connect(loop, host='localhost', port=4002, clientId=99)

from tws_async.

erdewit avatar erdewit commented on May 25, 2024

I will look further into it but have no clue what could be different on OSX and no way of testing.

The strange thing is that the notebook works for you. Btw you can also use the IB supplied sample scripts.

from tws_async.

sleepykid avatar sleepykid commented on May 25, 2024

ok thanks, I think because the notebook version uses PyQt5.QtNetwork whereas tws_async.py doesn't

from tws_async.

erdewit avatar erdewit commented on May 25, 2024

I've tested it with an image of OS X 10.11.6 and could reproduce the issue.
The issue is caused by the "::1 localhost" IPv6 alias in the /etc/hosts file.
It can be solved by using '127.0.0.1' instead of 'localhost' in the connect call.

Note that this would apply to the IB supplied sample files as well.

from tws_async.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.