Re: [Quickfix-developers] QuickFIX Python binding and repeating groups
Brought to you by:
orenmnero
|
From: Reggie D. <re...@me...> - 2006-08-11 23:06:58
|
On Fri, 2006-08-11 at 10:42 -0700, or...@qu... wrote: > > The quickfix44.py that is generated starts with a class NoHops which is > > derived from fix.Group. This class is indented, presumably because > > groups are usually a part of a containing Message (which does not seem > > to be the case here). This is a syntax error in Python and for now I've > > manually dedented that class definition to be able to import the file. > > What would be the correct fix for this? > > This was apparently the repeating group from the header that didn't have > a home. I've updated the generator so it is not placed in this file > anymore. I have checked the fix into the svn repository. > quickfix44.py imports fine now, thanks > > I'm trying to create a MarketDataRequest message which contains > > repeating groups. I've attempted to follow the repeating group example > > in the documentation, but I get the following traceback: > [snip] > > I've tried looking around in the source code, but I can't find any > > definition of intArray. Is this the correct way to set up a repeating > > group? Where is intArray defined? > > This should be referencing IntArray instead of intArray. This fix has > also been checked into svn. > Thanks, I can successfully make MarketDataRequests now. > > I'm currently doing everything within the callbacks of a class derived > > from fix.Application, and using the block method of SocketInitiator, but > > when I've tried to use separate threads, I've gotten "Segmentation > > Fault" both when using the start method or when trying to create the > > threads myself using Python's threading module. What is the correct way > > to do this? > > Can you provide more details? Are you segfaulting immediately? Does it > happen over time? > It segfaults almost immediately; seems to be just after the session is created. It seems to be trying to send the logon message according to this gdb output: GNU gdb Red Hat Linux (6.3.0.0-1.84rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/libthread_db.so.1". Reading symbols from shared object read from target memory...(no debugging symbols found)...done. Loaded system supplied DSO at 0x664000 Core was generated by `python fixplay.py'. Program terminated with signal 11, Segmentation fault. warning: svr4_current_sos: Can't read pathname for load map: Input/output error Reading symbols from /usr/lib/libpython2.4.so.1.0...(no debugging symbols found)...done. ... Reading symbols from /usr/lib/python2.4/lib-dynload/_weakref.so...done. Loaded symbols for /usr/lib/python2.4/lib-dynload/_weakref.so #0 0x00000269 in ?? () (gdb) where #0 0x00000269 in ?? () #1 0x00139f9f in FIX::Session::sendRaw (this=0x97dae80, message=@0xb786d940, num=0) at Session.cpp:457 #2 0x0014481d in FIX::Session::generateLogon (this=0x97dae80) at Session.cpp:602 #3 0x00144fce in FIX::Session::next (this=0x97dae80) at Session.cpp:147 #4 0x0017bd8f in FIX::SocketConnection::onTimeout (this=0x96d72d0) at SocketConnection.cpp:239 #5 0x001738af in FIX::SocketInitiator::onTimeout (this=0x93bb888) at SocketInitiator.cpp:244 #6 0x00166b03 in FIX::ConnectorWrapper::onTimeout (this=0xb786dd3c) at SocketConnector.cpp:89 #7 0x0017a8f3 in FIX::SocketMonitor::block (this=0x93bb96c, strategy=@0x6cd44a, poll=false) at SocketMonitor.cpp:228 Previous frame inner to this frame (corrupt stack?) (gdb) Hopefully this will help, let me know if I can provide you with any other info. > --oren > -- -Reggie |