Coder Social home page Coder Social logo

ibpy's People

Watchers

 avatar

ibpy's Issues

errors with fresh build form source

hi all-- I'm sort of a newbie, but i'm a fast learner. Looking for a little 
help and direction. I followed the directions for building and getting things 
setup from troy (thanks btw!). I was trying to follow through some of the 
examples but none of the demos or any imports seem to work. They all crash with 
the same errors:

>>> from ib.opt import ibConnection, message
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/ib/opt/__init__.py", line 30, in <module>
    from ib.opt.connection import Connection
  File "/Library/Python/2.7/site-packages/ib/opt/connection.py", line 22, in <module>
    from ib.opt.sender import Sender
  File "/Library/Python/2.7/site-packages/ib/opt/sender.py", line 11, in <module>
    from ib.ext.EClientSocket import EClientSocket
  File "/Library/Python/2.7/site-packages/ib/ext/EClientSocket.py", line 21, in <module>
    from ib.ext.EReader import EReader
  File "/Library/Python/2.7/site-packages/ib/ext/EReader.py", line 29
    from __builtin__ import float, str, None, True, False
SyntaxError: cannot assign to None
>>> 

I'm working on a Mac OS 10.8

Any and all help very appreciated!

Original issue reported on code.google.com by [email protected] on 6 Aug 2012 at 9:53

reqHistoricalData - Had to change Bar Size to string

What steps will reproduce the problem?
1.demo/reference_python reqHistoricalData
2.
3.

What is the expected output? What do you see instead?
accept the request.   It complained about Bar Size that isn't acceptable. 
I changed the integer 'BarSize' field to a string like "15 secs" and that
fixed it.  (also had to change the date so it was less than a year out).

What version of the product are you using? On what operating system?
latest svn code.


Please provide any additional information below.
maybe a problem with my setup (api_coverage only says I have 29%).



Original issue reported on code.google.com by [email protected] on 22 Jan 2008 at 2:58

object of type 'bool' has no len()

What steps will reproduce the problem?
1. Download the attached file "issue3" which is modified from r290
2. Run it with "python2.5 issue3"
3.

What is the expected output? What do you see instead?
I got output:
r290
calling run_0
calling run_2
## error:  code=510  message=Request Market Data Sending Error - object of
type 'bool' has no len()
## error:  code=None message=unpack requires a string argument of length 1
## error:  code=504  message=Not connected


What version of the product are you using? On what operating system?
r290. Debian GNU/Linux


Please provide any additional information below.
This error might happen under quite distinct conditions.


Original issue reported on code.google.com by [email protected] on 7 Jan 2008 at 1:32

Attachments:

r347 broke sed syntax

Hi, I just discovered ibpy and tried to build it from trunk but hit an error 
running the Makefile:

% make
[I] building release=0.8.0-9.62 version=0.8.0 revision=348 api=9.62
[I] exporting source from http://ibpy.googlecode.com/svn/trunk into 
release-0.8.0-9.62
[I] fixing version strings
sed: can't read s/api = "0"/api = "9.62"/: No such file or directory
make: *** [release-0.8.0-9.62] Error 2

It looks to me that r347 broke the sed syntax with the two double quotes (""). 
Are they there for a reason? I am using GNU sed 4.2.1 on linux.


Original issue reported on code.google.com by [email protected] on 29 Jan 2012 at 4:00

demo/api_coverage unexpected keyword argument 'tickerId'

What steps will reproduce the problem?
1. login to TWS
2. run demo/api_coverage
3.

What is the expected output? What do you see instead?
Unsure, but not this:
python api_coverage 

Traceback (most recent call last):
  File "api_coverage", line 416, in <module>
    main(get_options())
  File "api_coverage", line 358, in main
    errors = call(con, options)
  File "api_coverage", line 139, in inner
    v = call(connection, options)
  File "api_coverage", line 152, in inner
    rv = call(connection, options)
  File "api_coverage", line 236, in test_007
    formatDate=1)
TypeError: wrapperMethod() got an unexpected keyword argument 'tickerId'

What version of the product are you using? On what operating system?
IbPy-0.7.7-9.62, OSX 10.6.8

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 15 Aug 2011 at 7:24

tickOptionComputation now has 7 arguments

What steps will reproduce the problem?
1. receiving option market data
2.
3.

What is the expected output? What do you see instead?
  File "/usr/local/lib/python2.7/dist-packages/ib/ext/EReader.py", line 148, in processMsg
    self.eWrapper().tickOptionComputation(tickerId, tickType, impliedVol, delta, modelPrice, pvDividend)
TypeError: tickOptionComputation() takes exactly 5 arguments (7 given)

What version of the product are you using? On what operating system?
trunk ibpy version, latest ib tws build, ubuntu 64

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 25 Mar 2013 at 3:09

Connection made (it seems) but no data downloaded before connection closed

What steps will reproduce the problem?
1. Running through Python's IDLE.
2. Previously submitted issue - API coverage tests (IBPy, not completing
either.
3. Only using for historical data at this point so no other modules are
being used or called.
4. Works fine using TWS Java sample client - data (using same request
parameters) appears fine.

What is the expected output? What do you see instead?
22-Feb-10 20:20:57 DEBUG     Server Version:  46
22-Feb-10 20:20:57 DEBUG     TWS Time at connection:  20100222 20:20:57 CST
<ReqHistoricalDataBefore tickerId=10, contract=<ib.ext.Contract.Contract
object at 0x30a5090>, endDateTime=20090224 11:00:00 EST, durationStr=1800
S, barSizeSetting=1 secs, whatToShow=TRADES, useRTH=0,
formatDate=1><ConnectionClosed>
<ReqHistoricalDataAfter tickerId=10, contract=<ib.ext.Contract.Contract
object at 0x30a5090>, endDateTime=20090224 11:00:00 EST, durationStr=1800
S, barSizeSetting=1 secs, whatToShow=TRADES, useRTH=0, formatDate=1>


What version of the product are you using? On what operating system?
R345 downloaded from SVN Feb-21-2010.  Linux/Ubuntu 9.10 Python 2.6 - all
updates in.  


Please provide any additional information below.
TWS reports incoming connection.  TWS returns connection time so I'm
assuming the connection was actually made.  Tried varying the sleep period
thinking I was closing connection too rapidly.  The message handling loop
is not getting invoked as I've tested it by putting simple "print"
statements which never appear.Enabled filtering at "root" level.  Listener
is using 'historicalData' for the con.register.

If you need any other info, let me know.  Thx.


Original issue reported on code.google.com by [email protected] on 23 Feb 2010 at 2:33

con.register not working as described

I'm trying to register a callback:

def my_callback(msg):
    print msg

con = ibConnection()
con.register(my_callback, message.tickPrice)

This doesn't work. But it is used like that in the examples and the docstring 
of register seems to indicate that this should work.

Alternatives that work are:
- con.register(my_test, (message.tickSize,))
- con.register(my_test, message.registry['tickPrice'])

Original issue reported on code.google.com by [email protected] on 1 May 2012 at 3:41

Run IP code without yes/no pause in Trade Workstation?

What steps will reproduce the problem?
1. I run the "show Bid and Ask quotes" demo, how do I get the script to flow 
without pausing with the yes/no on the Trader Workstation?

2.
3.

What is the expected output? What do you see instead?
I don't want the script to pause.

Message on IB TWS requests whether I want to accept incoming connection?


What version of the product are you using? On what operating system?
Python 2.7.2 
06-Oct-12 19:52:06 DEBUG     Server Version:  59

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 6 Oct 2012 at 9:56

IBPY 0.7.7 Rev 345 Error on api_coverage

What steps will reproduce the problem?
1. running TWSAPI 9.62 - checked for updates, current
2. running TWS Workstation and API - able to run sample program and
download historical data so connection works
3. Run sudo python api_coverage - TWS pops up "Accept incoming connection"
- accepted.

What is the expected output? What do you see instead
thon api_coverage
Traceback (most recent call last):
  File "api_coverage", line 416, in <module>
    main(get_options())
  File "api_coverage", line 358, in main
    errors = call(con, options)
  File "api_coverage", line 139, in inner
    v = call(connection, options)
  File "api_coverage", line 152, in inner
    rv = call(connection, options)
  File "api_coverage", line 236, in test_007
    formatDate=1)
TypeError: wrapperMethod() got an unexpected keyword argument 'tickerId'
chuck@AMD-Desktop-Ubuntu:/usr/local/lib/python2.6/dist-packages/ib/demo$ ^C
chuck@AMD-Desktop-Ubuntu:/usr/local/lib/python2.6/dist-packages/ib/demo

What version of the product are you using? On what operating system?
Running Ubuntu 9.10 AMD 64 2GB RAM.  IBPY from SVN library downloaded
Feb-22-2010. Rev 345 per SVN screen Rel 0.7.7.


Please provide any additional information below.
IBPY does not start up.  Fails after receiving above message.  Let me know
what add'l info you need.

Ran example_opt received following:
disconnected True
21-Feb-10 04:35:57 DEBUG     Server Version:  46
21-Feb-10 04:35:57 DEBUG     TWS Time at connection:  20100221 04:35:57 CST
reconnected True
21-Feb-10 04:35:58 ERROR     Exception while processing message.  
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/ib/ext/EReader.py", line 92,
in run
    while not self.isInterrupted() and self.processMsg(self.readInt()):
  File "/usr/local/lib/python2.6/dist-packages/ib/ext/EReader.py", line
663, in readInt
    strval = self.readStr()
  File "/usr/local/lib/python2.6/dist-packages/ib/ext/EReader.py", line
651, in readStr
    c = self.m_dis.readByte()
  File "/usr/local/lib/python2.6/dist-packages/ib/lib/__init__.py", line
110, in readByte
    return unpack('!b', self.recv(1))[0]
error: [Errno 104] Connection reset by peer
again disconnected False
chuck@AMD-Desktop-Ubuntu:~/ibpy-read-only/release-0.7.7-/demo$
This did print some account info at the top of the screen before generating
this message, but did not want to attach account data to this msg.


Original issue reported on code.google.com by [email protected] on 21 Feb 2010 at 10:38

Reconnect error: clientId already in use

What steps will reproduce the problem?
1. app.eConnect()
2. app.eDisconnect()
3. app.eConnect()

What is the expected output? What do you see instead?
I would expect normal connection again, but instead I see this error message:
errorCode:326
    errorMsg:Unable connect as the client id is already in use. Retry with a unique client id.

What version of the product are you using? On what operating system?
0.7.6-9.51 on Windows XP

Please provide any additional information below.

In the IB Gateway I still see that the client is open after eDisconnect is 
called. The other clients (Excel) disconnect properly. If the Python 
interpreter is restarted, the connection is finally closed. 

I inserted an explicit call to socket shutdown and close in eDisconnect to 
force the connection to be broken.




    @eConnect.register(object, Socket, int)
    @synchronized(mlock)
    def eConnect_0(self, socket, clientId):
        self.ibsocket = socket # will use it in eDisconnect
        self.m_dos = DataOutputStream(socket.getOutputStream())
        ...




    @synchronized(mlock)
    def eDisconnect(self):
        ... # omitted
        try:
            if self.reader is not None:
                self.reader.interrupt()
        except (Exception, ), e:
            pass
        try :
            # close the socket, don't wait till the other handle is freed
            #http://stackoverflow.com/questions/409783/socket-shutdown-vs-socket-close
            self.ibsocket.shutdown(SHUT_RDWR)
            self.ibsocket.close()
        except (Exception, ), e:
            pass 
        try:
            if dos is not None:
                dos.close()
        except (Exception, ), e:
            pass 


Best regards,
Aa`Koshh

Original issue reported on code.google.com by [email protected] on 16 Nov 2011 at 1:03

installation on Linux - fails

What steps will reproduce the problem?
1. python setup.py install
2.
3.

What is the expected output? What do you see instead?
expect: clean install.  Error - byte-compiling
/usr/local/lib/python2.4/site-packages/ib/opt/message.py to message.pyc
  File "/usr/local/lib/python2.4/site-packages/ib/opt/message.py", line 68
    return '<%s message%s>' % (name, ' ' + items if items else '')
and 6 others, error arrow point to 'if'

What version of the product are you using? On what operating system?
0.7.1-9, on Centos 4.4  (with python 2.4)


Please provide any additional information below.
IbPy 0.5 installed fine.


Original issue reported on code.google.com by [email protected] on 24 Feb 2007 at 3:14

Trouble installing IbPy-0.7.6-9.51, error during bytecompile of EReader.py

What steps will reproduce the problem?

# wget http://ibpy.googlecode.com/files/IbPy-0.7.6-9.51.tar.gz
# tar xfz IbPy-0.7.6-9.51.tar.gz
# cd IbPy-0.7.6-9.51
# python setup.py install


What is the expected output? What do you see instead?

Expected is completed installation, instead I get the output:

running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/ib
copying ib/__init__.py -> build/lib.linux-x86_64-2.7/ib
creating build/lib.linux-x86_64-2.7/ib/lib
copying ib/lib/logger.py -> build/lib.linux-x86_64-2.7/ib/lib
copying ib/lib/__init__.py -> build/lib.linux-x86_64-2.7/ib/lib
copying ib/lib/overloading.py -> build/lib.linux-x86_64-2.7/ib/lib
creating build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/EClientErrors.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/ExecutionFilter.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/ScannerSubscription.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/Contract.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/AnyWrapper.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/EWrapperMsgGenerator.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/OrderState.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/AnyWrapperMsgGenerator.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/EReader.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/Util.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/EWrapper.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/__init__.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/ComboLeg.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/TickType.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/Execution.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/EClientSocket.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/UnderComp.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/Order.py -> build/lib.linux-x86_64-2.7/ib/ext
copying ib/ext/ContractDetails.py -> build/lib.linux-x86_64-2.7/ib/ext
creating build/lib.linux-x86_64-2.7/ib/opt
copying ib/opt/sender.py -> build/lib.linux-x86_64-2.7/ib/opt
copying ib/opt/__init__.py -> build/lib.linux-x86_64-2.7/ib/opt
copying ib/opt/connection.py -> build/lib.linux-x86_64-2.7/ib/opt
copying ib/opt/message.py -> build/lib.linux-x86_64-2.7/ib/opt
copying ib/opt/receiver.py -> build/lib.linux-x86_64-2.7/ib/opt
creating build/lib.linux-x86_64-2.7/ib/sym
copying ib/sym/__init__.py -> build/lib.linux-x86_64-2.7/ib/sym
running install_lib
byte-compiling /usr/local/lib/python2.7/dist-packages/ib/ext/EReader.py to 
EReader.pyc
  File "/usr/local/lib/python2.7/dist-packages/ib/ext/EReader.py", line 29
    from __builtin__ import float, str, None, True, False
SyntaxError: cannot assign to None

running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/IbPy-0.7.6_9.51.egg-info
Writing /usr/local/lib/python2.7/dist-packages/IbPy-0.7.6_9.51.egg-info


What version of the product are you using? On what operating system?
IbPy-0.7.6_9.51, on Linux Mint 15 with Python 2.7 

Please provide any additional information below.



Original issue reported on code.google.com by [email protected] on 27 Jul 2013 at 1:17

disconnect and re-connect failure

What steps will reproduce the problem?
1. call connection.connect()
2. call connection.disconnect()
3. call connection.connect()

What is the expected output? What do you see instead?
It is expect to connect fine in step 3. But instead I got ## error: 
code=326  message=Unable connect as the client id is already in use. Retry
with a unique client id. 

What version of the product are you using? On what operating system?
r290. Debian GNU/Linux.

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 7 Jan 2008 at 1:16

Problem with ScannerSubscription

What steps will reproduce the problem?

Run the attached python file.


What is the expected output? What do you see instead?

I expect some lines indicating that the scannerdata method has been called. 
Instead, I get this cryptic error:

ERROR:  10005 322 Error processing request:-'qc' : cause - 
jextend.qc.f(qc.java:257)

What version of the product are you using? On what operating system?

0.7.6-9.51, Windows Server 2003, TWS is build 896.7, July 19.

Please provide any additional information below.

I'm not sure if there's something wrong in my sample code or if its 
something in ibpy. I've tried a few different ScannerSubscription 
properties but keep getting the same error. Is it a simple oversight or 
something more sinister?




Original issue reported on code.google.com by [email protected] on 22 Jul 2009 at 7:02

Attachments:

Error handling itself raises a TypeError due to wrong # of arguments (overloading appears not to be working)

when i try to place an invalid order via placeOrder, IbPy attempts to send me 
an EClientErrors.FAIL_SEND_ORDER but fails; the attempt to send the error 
itself has an error.

i get:


error trace:

(parts of the error trace in my application code omitted except for this first 
bit at line 789:)

--> 789         self._ib.placeOrder(self._increment_nextValidOrderId, contract, 
order.makeIbOrder())
    790 
    791 

/usr/local/lib/python2.7/dist-packages/ib/opt/sender.pyc in wrapperMethod(*args)
     69             def wrapperMethod(*args):
     70                 self.dispatcher(name+'Before', dict(zip(before.__slots__, args)))
---> 71                 result = value(*args)
     72                 self.dispatcher(name+'After', dict(zip(after.__slots__, args)))
     73                 return result

/usr/local/lib/python2.7/dist-packages/ib/lib/__init__.pyc in inner(*args, 
**kwds)
     43             lock.acquire()
     44             try:
---> 45                 return func(*args, **kwds)
     46             finally:
     47                 lock.release()

/usr/local/lib/python2.7/dist-packages/ib/ext/EClientSocket.pyc in 
placeOrder(self, id, contract, order)
    775                 self.send(order.m_whatIf)
    776         except (Exception, ), e:
--> 777             self.error(id, EClientErrors.FAIL_SEND_ORDER, str(e))
    778             self.close()
    779 

/usr/local/lib/python2.7/dist-packages/ib/lib/overloading.pyc in __call__(self, 
*args)
     80         if func is None:
     81             self.cache[types] = func = self.find_func(types)
---> 82         return func(*args)
     83 
     84     def find_func(self, types):

/usr/local/lib/python2.7/dist-packages/ib/lib/__init__.pyc in inner(*args, 
**kwds)
     43             lock.acquire()
     44             try:
---> 45                 return func(*args, **kwds)
     46             finally:
     47                 lock.release()

TypeError: error() takes exactly 2 arguments (4 given)

Original issue reported on code.google.com by [email protected] on 22 Dec 2011 at 5:52

trunk/ib/ext/cfg/Makefile corrupt since r287

Date: Tue Nov  6 09:38:32 2007
New Revision: 287 

...

Modified: trunk/ib/ext/cfg/Makefile
==============================================================================
--- trunk/ib/ext/cfg/Makefile   (original)
+++ trunk/ib/ext/cfg/Makefile   Tue Nov  6 09:38:32 2007
@@ -1,4 +1,4 @@
-configs := $(addsuffix .py, $(notdir $(basename $(wildcard
../src/IBJts/java/com/ib/client/*.java))))
+0;136;0cconfigs := $(addsuffix .py, $(notdir $(basename $(wildcard
../src/IBJts/com/ib/client/*.java))))

 .PHONY: all clean 

...

Original issue reported on code.google.com by [email protected] on 7 Jan 2008 at 3:17

Error when trying to download hist data

What steps will reproduce the problem?
1. running the reference_python file with param : reqHistorialData
2.
3.

What is the expected output? What do you see instead?
Expect historial data but get :
errorMsg:Request Historical Data Sending Error - 'tuple' object has no 
attribute 'getBytes'

What version of the product are you using? On what operating system?
Py 2.6, Win XP, latest TWS 918.9b from Aug 4, 2011

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 1 Sep 2011 at 4:55

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.