ib-ruby / ib-api

Lightweight Ruby interface to Interactive Brokers' TWS API
https://ib-ruby.github.io/ib-api/
GNU General Public License v3.0
18 stars 9 forks source link

red specs while connecting to paper account #34

Open psmandzich opened 7 months ago

psmandzich commented 7 months ago

I changed my configuration in spec.yml as described in the readme and furthermore I changed the port to 7964 (TWS). Running specs against my paper account returns several errors (e.g. spec/ib/integration/account_info_spec.rb) Running spec/ib/integration/account_info_spec.rb with my real account success.

Is that a known problem or do I am something wrong?

topofocus commented 7 months ago

Hi, the test runs without errors, in main- and V10-branch, independent of the nature of the account.

What error messages do you get?

However, the standard api port of the paper-trading tws is 7497.

btw. today I will publish a new plugin-based configuration to the v10 branch (retiring IB Extensions). Perhaps you can check and comment that later.

psmandzich commented 7 months ago

I checked out your last commit (fd2ccb8f2299004f46d9027e1d4c679b11bde365) Same behavior as above.

I changed the tws default port for my paper account to 7496. As I see, I have no difference in the two config at Api >> Settings

Spec run output ``` Failures: 1) Request Account Data with subscribe option set behaves like Valid account data request received :PortfolioValue message is expected to be a kind of IB::Messages::Incoming::PortfolioValue Failure/Error: it { is_expected.to be_an IB::Messages::Incoming::PortfolioValue } expected nil to be a kind of IB::Messages::Incoming::PortfolioValue Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:20 # ./spec/account_helper.rb:54:in `block (3 levels) in ' 2) Request Account Data with subscribe option set behaves like Valid account data request received :PortfolioValue message contract Failure/Error: its( :contract ) { is_expected.to be_a IB::Contract } NoMethodError: undefined method `contract' for nil:NilClass Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:20 # ./spec/account_helper.rb:55:in `block (3 levels) in ' 3) Request Account Data with subscribe option set behaves like Valid account data request received :PortfolioValue message data Failure/Error: its( :data ) { is_expected.to be_a Hash } NoMethodError: undefined method `data' for nil:NilClass Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:20 # ./spec/account_helper.rb:56:in `block (3 levels) in ' 4) Request Account Data with subscribe option set behaves like Valid account data request received :PortfolioValue message portfolio_value Failure/Error: its( :portfolio_value ){is_expected.to be_a IB::PortfolioValue } NoMethodError: undefined method `portfolio_value' for nil:NilClass Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:20 # ./spec/account_helper.rb:57:in `block (3 levels) in ' 5) Request Account Data with subscribe option set behaves like Valid account data request received :PortfolioValue message account Failure/Error: its( :account ) { is_expected.to match /\w\d/ } NoMethodError: undefined method `account' for nil:NilClass Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:20 # ./spec/account_helper.rb:58:in `block (3 levels) in ' 6) Request Account Data with subscribe option set behaves like Valid account data request received :PortfolioValue message to_human Failure/Error: its( :to_human ) { is_expected.to match /PortfolioValue/ } NoMethodError: undefined method `to_human' for nil:NilClass Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:20 # ./spec/account_helper.rb:60:in `block (3 levels) in ' 7) Request Account Data without subscribe option behaves like Valid account data request received :PortfolioValue message is expected to be a kind of IB::Messages::Incoming::PortfolioValue Failure/Error: it { is_expected.to be_an IB::Messages::Incoming::PortfolioValue } expected nil to be a kind of IB::Messages::Incoming::PortfolioValue Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:35 # ./spec/account_helper.rb:54:in `block (3 levels) in ' 8) Request Account Data without subscribe option behaves like Valid account data request received :PortfolioValue message contract Failure/Error: its( :contract ) { is_expected.to be_a IB::Contract } NoMethodError: undefined method `contract' for nil:NilClass Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:35 # ./spec/account_helper.rb:55:in `block (3 levels) in ' 9) Request Account Data without subscribe option behaves like Valid account data request received :PortfolioValue message data Failure/Error: its( :data ) { is_expected.to be_a Hash } NoMethodError: undefined method `data' for nil:NilClass Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:35 # ./spec/account_helper.rb:56:in `block (3 levels) in ' 10) Request Account Data without subscribe option behaves like Valid account data request received :PortfolioValue message portfolio_value Failure/Error: its( :portfolio_value ){is_expected.to be_a IB::PortfolioValue } NoMethodError: undefined method `portfolio_value' for nil:NilClass Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:35 # ./spec/account_helper.rb:57:in `block (3 levels) in ' 11) Request Account Data without subscribe option behaves like Valid account data request received :PortfolioValue message account Failure/Error: its( :account ) { is_expected.to match /\w\d/ } NoMethodError: undefined method `account' for nil:NilClass Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:35 # ./spec/account_helper.rb:58:in `block (3 levels) in ' 12) Request Account Data without subscribe option behaves like Valid account data request received :PortfolioValue message to_human Failure/Error: its( :to_human ) { is_expected.to match /PortfolioValue/ } NoMethodError: undefined method `to_human' for nil:NilClass Shared Example Group: "Valid account data request" called from ./spec/ib/integration/account_info_spec.rb:35 # ./spec/account_helper.rb:60:in `block (3 levels) in ' 13) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message is expected to be a kind of IB::Messages::Incoming::PortfolioValue Failure/Error: it { is_expected.to be_an IB::Messages::Incoming::PortfolioValue } expected nil to be a kind of IB::Messages::Incoming::PortfolioValue Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:5:in `block (2 levels) in ' 14) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message has class accessors as well Failure/Error: expect( subject.class.message_id).to eq 7 NoMethodError: undefined method `message_id' for NilClass:Class Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:16:in `block (2 levels) in ' 15) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message message_type Failure/Error: its( :message_type ){ is_expected.to eq :PortfolioValue } NoMethodError: undefined method `message_type' for nil:NilClass Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:6:in `block (2 levels) in ' 16) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message contract Failure/Error: its( :contract ){ is_expected.to be_a IB::Contract } NoMethodError: undefined method `contract' for nil:NilClass Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:7:in `block (2 levels) in ' 17) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message portfolio_value Failure/Error: its( :portfolio_value ){ is_expected.to be_a IB::PortfolioValue } NoMethodError: undefined method `portfolio_value' for nil:NilClass Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:8:in `block (2 levels) in ' 18) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message message_id Failure/Error: its( :message_id ){ is_expected.to eq 7 } NoMethodError: undefined method `message_id' for nil:NilClass Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:9:in `block (2 levels) in ' 19) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message buffer Failure/Error: its( :buffer ){ is_expected.to be_empty } NoMethodError: undefined method `buffer' for nil:NilClass Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:10:in `block (2 levels) in ' 20) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message behaves like Valid PortfolioValue Object Failure/Error: let( :the_portfolio_value_object ){ the_portfolio_value.portfolio_value } NoMethodError: undefined method `portfolio_value' for nil:NilClass Shared Example Group: "Valid PortfolioValue Object" called from ./spec/ib/messages/incoming/account_info_spec.rb:12 Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:13:in `block (3 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:22:in `block (2 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:23:in `block (2 levels) in ' 21) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message behaves like Valid PortfolioValue Object position Failure/Error: let( :the_portfolio_value_object ){ the_portfolio_value.portfolio_value } NoMethodError: undefined method `portfolio_value' for nil:NilClass Shared Example Group: "Valid PortfolioValue Object" called from ./spec/ib/messages/incoming/account_info_spec.rb:12 Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:13:in `block (3 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:22:in `block (2 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:24:in `block (2 levels) in ' 22) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message behaves like Valid PortfolioValue Object market_price Failure/Error: let( :the_portfolio_value_object ){ the_portfolio_value.portfolio_value } NoMethodError: undefined method `portfolio_value' for nil:NilClass Shared Example Group: "Valid PortfolioValue Object" called from ./spec/ib/messages/incoming/account_info_spec.rb:12 Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:13:in `block (3 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:22:in `block (2 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:25:in `block (2 levels) in ' 23) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message behaves like Valid PortfolioValue Object market_value Failure/Error: let( :the_portfolio_value_object ){ the_portfolio_value.portfolio_value } NoMethodError: undefined method `portfolio_value' for nil:NilClass Shared Example Group: "Valid PortfolioValue Object" called from ./spec/ib/messages/incoming/account_info_spec.rb:12 Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:13:in `block (3 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:22:in `block (2 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:26:in `block (2 levels) in ' 24) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message behaves like Valid PortfolioValue Object average_cost Failure/Error: let( :the_portfolio_value_object ){ the_portfolio_value.portfolio_value } NoMethodError: undefined method `portfolio_value' for nil:NilClass Shared Example Group: "Valid PortfolioValue Object" called from ./spec/ib/messages/incoming/account_info_spec.rb:12 Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:13:in `block (3 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:22:in `block (2 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:27:in `block (2 levels) in ' 25) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message behaves like Valid PortfolioValue Object unrealized_pnl Failure/Error: let( :the_portfolio_value_object ){ the_portfolio_value.portfolio_value } NoMethodError: undefined method `portfolio_value' for nil:NilClass Shared Example Group: "Valid PortfolioValue Object" called from ./spec/ib/messages/incoming/account_info_spec.rb:12 Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:13:in `block (3 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:22:in `block (2 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:28:in `block (2 levels) in ' 26) IB::Messages::Incoming Message received from IB behaves like Portfolio Value Message behaves like Valid PortfolioValue Object realized_pnl Failure/Error: let( :the_portfolio_value_object ){ the_portfolio_value.portfolio_value } NoMethodError: undefined method `portfolio_value' for nil:NilClass Shared Example Group: "Valid PortfolioValue Object" called from ./spec/ib/messages/incoming/account_info_spec.rb:12 Shared Example Group: "Portfolio Value Message" called from ./spec/ib/messages/incoming/account_info_spec.rb:60 # ./spec/ib/messages/incoming/account_info_spec.rb:13:in `block (3 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:22:in `block (2 levels) in ' # ./spec/ib/messages/incoming/account_info_spec.rb:29:in `block (2 levels) in ' 27) IB::Messages::Incoming::AccountUpdatesMulti Message received wfrom IB behaves like Account Updates Multi Message Failure/Error: i = BigDecimal(i) unless i.blank? ArgumentError: invalid value for BigDecimal(): "DU432XXXX" Shared Example Group: "Account Updates Multi Message" called from ./spec/ib/messages/incoming/account_update_multi_spec.rb:35 # ./lib/ib/support.rb:31:in `BigDecimal' # ./lib/ib/support.rb:31:in `read_decimal' # ./lib/ib/messages/incoming/abstract_message.rb:96:in `block in load_map' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `each' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `load_map' # ./lib/ib/messages/incoming/abstract_message.rb:52:in `simple_load' # ./lib/ib/messages/incoming/abstract_message.rb:63:in `load' # ./lib/ib/messages/incoming/abstract_message.rb:41:in `initialize' # ./lib/ib/connection.rb:437:in `new' # ./lib/ib/connection.rb:437:in `block in process_message' # ./lib/ib/prepare_data.rb:51:in `decode_message' # ./lib/ib/connection.rb:425:in `process_message' # ./lib/ib/connection.rb:306:in `process_messages' # ./lib/ib/connection.rb:402:in `block in start_reader' 28) IB::Messages::Incoming::AccountUpdatesMulti Message received wfrom IB behaves like Account Updates Multi Message has class accessors as well Failure/Error: i = BigDecimal(i) unless i.blank? ArgumentError: invalid value for BigDecimal(): "DU432XXXX" Shared Example Group: "Account Updates Multi Message" called from ./spec/ib/messages/incoming/account_update_multi_spec.rb:35 # ./lib/ib/support.rb:31:in `BigDecimal' # ./lib/ib/support.rb:31:in `read_decimal' # ./lib/ib/messages/incoming/abstract_message.rb:96:in `block in load_map' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `each' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `load_map' # ./lib/ib/messages/incoming/abstract_message.rb:52:in `simple_load' # ./lib/ib/messages/incoming/abstract_message.rb:63:in `load' # ./lib/ib/messages/incoming/abstract_message.rb:41:in `initialize' # ./lib/ib/connection.rb:437:in `new' # ./lib/ib/connection.rb:437:in `block in process_message' # ./lib/ib/prepare_data.rb:51:in `decode_message' # ./lib/ib/connection.rb:425:in `process_message' # ./lib/ib/connection.rb:306:in `process_messages' # ./lib/ib/connection.rb:402:in `block in start_reader' 29) IB::Messages::Incoming::AccountUpdatesMulti Message received wfrom IB behaves like Account Updates Multi Message message_type Failure/Error: i = BigDecimal(i) unless i.blank? ArgumentError: invalid value for BigDecimal(): "DU432XXXX" Shared Example Group: "Account Updates Multi Message" called from ./spec/ib/messages/incoming/account_update_multi_spec.rb:35 # ./lib/ib/support.rb:31:in `BigDecimal' # ./lib/ib/support.rb:31:in `read_decimal' # ./lib/ib/messages/incoming/abstract_message.rb:96:in `block in load_map' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `each' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `load_map' # ./lib/ib/messages/incoming/abstract_message.rb:52:in `simple_load' # ./lib/ib/messages/incoming/abstract_message.rb:63:in `load' # ./lib/ib/messages/incoming/abstract_message.rb:41:in `initialize' # ./lib/ib/connection.rb:437:in `new' # ./lib/ib/connection.rb:437:in `block in process_message' # ./lib/ib/prepare_data.rb:51:in `decode_message' # ./lib/ib/connection.rb:425:in `process_message' # ./lib/ib/connection.rb:306:in `process_messages' # ./lib/ib/connection.rb:402:in `block in start_reader' 30) IB::Messages::Incoming::AccountUpdatesMulti Message received wfrom IB behaves like Account Updates Multi Message value Failure/Error: i = BigDecimal(i) unless i.blank? ArgumentError: invalid value for BigDecimal(): "DU432XXXX" Shared Example Group: "Account Updates Multi Message" called from ./spec/ib/messages/incoming/account_update_multi_spec.rb:35 # ./lib/ib/support.rb:31:in `BigDecimal' # ./lib/ib/support.rb:31:in `read_decimal' # ./lib/ib/messages/incoming/abstract_message.rb:96:in `block in load_map' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `each' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `load_map' # ./lib/ib/messages/incoming/abstract_message.rb:52:in `simple_load' # ./lib/ib/messages/incoming/abstract_message.rb:63:in `load' # ./lib/ib/messages/incoming/abstract_message.rb:41:in `initialize' # ./lib/ib/connection.rb:437:in `new' # ./lib/ib/connection.rb:437:in `block in process_message' # ./lib/ib/prepare_data.rb:51:in `decode_message' # ./lib/ib/connection.rb:425:in `process_message' # ./lib/ib/connection.rb:306:in `process_messages' # ./lib/ib/connection.rb:402:in `block in start_reader' 31) IB::Messages::Incoming::AccountUpdatesMulti Message received wfrom IB behaves like Account Updates Multi Message key Failure/Error: i = BigDecimal(i) unless i.blank? ArgumentError: invalid value for BigDecimal(): "DU432XXXX" Shared Example Group: "Account Updates Multi Message" called from ./spec/ib/messages/incoming/account_update_multi_spec.rb:35 # ./lib/ib/support.rb:31:in `BigDecimal' # ./lib/ib/support.rb:31:in `read_decimal' # ./lib/ib/messages/incoming/abstract_message.rb:96:in `block in load_map' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `each' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `load_map' # ./lib/ib/messages/incoming/abstract_message.rb:52:in `simple_load' # ./lib/ib/messages/incoming/abstract_message.rb:63:in `load' # ./lib/ib/messages/incoming/abstract_message.rb:41:in `initialize' # ./lib/ib/connection.rb:437:in `new' # ./lib/ib/connection.rb:437:in `block in process_message' # ./lib/ib/prepare_data.rb:51:in `decode_message' # ./lib/ib/connection.rb:425:in `process_message' # ./lib/ib/connection.rb:306:in `process_messages' # ./lib/ib/connection.rb:402:in `block in start_reader' 32) IB::Messages::Incoming::AccountUpdatesMulti Message received wfrom IB behaves like Account Updates Multi Message currency Failure/Error: i = BigDecimal(i) unless i.blank? ArgumentError: invalid value for BigDecimal(): "DU432XXXX" Shared Example Group: "Account Updates Multi Message" called from ./spec/ib/messages/incoming/account_update_multi_spec.rb:35 # ./lib/ib/support.rb:31:in `BigDecimal' # ./lib/ib/support.rb:31:in `read_decimal' # ./lib/ib/messages/incoming/abstract_message.rb:96:in `block in load_map' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `each' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `load_map' # ./lib/ib/messages/incoming/abstract_message.rb:52:in `simple_load' # ./lib/ib/messages/incoming/abstract_message.rb:63:in `load' # ./lib/ib/messages/incoming/abstract_message.rb:41:in `initialize' # ./lib/ib/connection.rb:437:in `new' # ./lib/ib/connection.rb:437:in `block in process_message' # ./lib/ib/prepare_data.rb:51:in `decode_message' # ./lib/ib/connection.rb:425:in `process_message' # ./lib/ib/connection.rb:306:in `process_messages' # ./lib/ib/connection.rb:402:in `block in start_reader' 33) IB::Messages::Incoming::AccountUpdatesMulti Message received wfrom IB behaves like Account Updates Multi Message message_id Failure/Error: i = BigDecimal(i) unless i.blank? ArgumentError: invalid value for BigDecimal(): "DU432XXXX" Shared Example Group: "Account Updates Multi Message" called from ./spec/ib/messages/incoming/account_update_multi_spec.rb:35 # ./lib/ib/support.rb:31:in `BigDecimal' # ./lib/ib/support.rb:31:in `read_decimal' # ./lib/ib/messages/incoming/abstract_message.rb:96:in `block in load_map' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `each' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `load_map' # ./lib/ib/messages/incoming/abstract_message.rb:52:in `simple_load' # ./lib/ib/messages/incoming/abstract_message.rb:63:in `load' # ./lib/ib/messages/incoming/abstract_message.rb:41:in `initialize' # ./lib/ib/connection.rb:437:in `new' # ./lib/ib/connection.rb:437:in `block in process_message' # ./lib/ib/prepare_data.rb:51:in `decode_message' # ./lib/ib/connection.rb:425:in `process_message' # ./lib/ib/connection.rb:306:in `process_messages' # ./lib/ib/connection.rb:402:in `block in start_reader' 34) IB::Messages::Incoming::AccountUpdatesMulti Message received wfrom IB behaves like Account Updates Multi Message buffer Failure/Error: i = BigDecimal(i) unless i.blank? ArgumentError: invalid value for BigDecimal(): "DU432XXXX" Shared Example Group: "Account Updates Multi Message" called from ./spec/ib/messages/incoming/account_update_multi_spec.rb:35 # ./lib/ib/support.rb:31:in `BigDecimal' # ./lib/ib/support.rb:31:in `read_decimal' # ./lib/ib/messages/incoming/abstract_message.rb:96:in `block in load_map' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `each' # ./lib/ib/messages/incoming/abstract_message.rb:73:in `load_map' # ./lib/ib/messages/incoming/abstract_message.rb:52:in `simple_load' # ./lib/ib/messages/incoming/abstract_message.rb:63:in `load' # ./lib/ib/messages/incoming/abstract_message.rb:41:in `initialize' # ./lib/ib/connection.rb:437:in `new' # ./lib/ib/connection.rb:437:in `block in process_message' # ./lib/ib/prepare_data.rb:51:in `decode_message' # ./lib/ib/connection.rb:425:in `process_message' # ./lib/ib/connection.rb:306:in `process_messages' # ./lib/ib/connection.rb:402:in `block in start_reader' 35) IB::Messages::Incoming::Alert Message received from IB behaves like this Alert message message is expected to match /data farm/ Failure/Error: its( :message ){ is_expected.to match /data farm/ } expected "Verbindung zum Marktdatenzentrum ist OK:hfarm" to match /data farm/ Diff: @@ -1 +1 @@ -/data farm/ +"Verbindung zum Marktdatenzentrum ist OK:hfarm" Shared Example Group: "this Alert message" called from ./spec/ib/messages/incoming/alert_spec.rb:51 # ./spec/ib/messages/incoming/alert_spec.rb:13:in `block (2 levels) in ' 36) IB::Messages::Incoming Message for received from IB behaves like HeadTimeStamp message is expected to be a kind of IB::Messages::Incoming::HeadTimeStamp Failure/Error: it { is_expected.to be_an IB::Messages::Incoming::HeadTimeStamp } expected nil to be a kind of IB::Messages::Incoming::HeadTimeStamp Shared Example Group: "HeadTimeStamp message" called from ./spec/ib/messages/incoming/head_time_stamp_spec.rb:45 # ./spec/ib/messages/incoming/head_time_stamp_spec.rb:5:in `block (2 levels) in ' 37) IB::Messages::Incoming Message for received from IB behaves like HeadTimeStamp message has class accessors as well Failure/Error: expect( subject.class.message_id).to eq 88 NoMethodError: undefined method `message_id' for NilClass:Class Shared Example Group: "HeadTimeStamp message" called from ./spec/ib/messages/incoming/head_time_stamp_spec.rb:45 # ./spec/ib/messages/incoming/head_time_stamp_spec.rb:13:in `block (2 levels) in ' 38) IB::Messages::Incoming Message for received from IB behaves like HeadTimeStamp message message_type Failure/Error: its(:message_type) { is_expected.to eq :HeadTimeStamp } NoMethodError: undefined method `message_type' for nil:NilClass Shared Example Group: "HeadTimeStamp message" called from ./spec/ib/messages/incoming/head_time_stamp_spec.rb:45 # ./spec/ib/messages/incoming/head_time_stamp_spec.rb:6:in `block (2 levels) in ' 39) IB::Messages::Incoming Message for received from IB behaves like HeadTimeStamp message message_id Failure/Error: its(:message_id) { is_expected.to eq 88 } NoMethodError: undefined method `message_id' for nil:NilClass Shared Example Group: "HeadTimeStamp message" called from ./spec/ib/messages/incoming/head_time_stamp_spec.rb:45 # ./spec/ib/messages/incoming/head_time_stamp_spec.rb:7:in `block (2 levels) in ' 40) IB::Messages::Incoming Message for received from IB behaves like HeadTimeStamp message request_id Failure/Error: its(:request_id) {is_expected.to eq 123} NoMethodError: undefined method `request_id' for nil:NilClass Did you mean? request_con_id Shared Example Group: "HeadTimeStamp message" called from ./spec/ib/messages/incoming/head_time_stamp_spec.rb:45 # ./spec/ib/messages/incoming/head_time_stamp_spec.rb:8:in `block (2 levels) in ' 41) IB::Messages::Incoming Message for received from IB behaves like HeadTimeStamp message date Failure/Error: its(:date) { is_expected.to be_a Time } NoMethodError: undefined method `date' for nil:NilClass Shared Example Group: "HeadTimeStamp message" called from ./spec/ib/messages/incoming/head_time_stamp_spec.rb:45 # ./spec/ib/messages/incoming/head_time_stamp_spec.rb:9:in `block (2 levels) in ' 42) IB::Messages::Incoming Message for received from IB behaves like HeadTimeStamp message to_human Failure/Error: its(:to_human) { is_expected.to match /First Historical Datapoint/ } NoMethodError: undefined method `to_human' for nil:NilClass Shared Example Group: "HeadTimeStamp message" called from ./spec/ib/messages/incoming/head_time_stamp_spec.rb:45 # ./spec/ib/messages/incoming/head_time_stamp_spec.rb:10:in `block (2 levels) in ' 43) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message is expected to be a kind of IB::Messages::Incoming::OptionChainDefinition Failure/Error: it { is_expected.to be_an IB::Messages::Incoming::OptionChainDefinition } expected nil to be a kind of IB::Messages::Incoming::OptionChainDefinition Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:6:in `block (2 levels) in ' 44) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message has class accessors as well Failure/Error: expect( subject.class.message_id ).to eq 75 NoMethodError: undefined method `message_id' for NilClass:Class Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:18:in `block (2 levels) in ' 45) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message message_type Failure/Error: its(:message_type) { is_expected.to eq :OptionChainDefinition } NoMethodError: undefined method `message_type' for nil:NilClass Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:7:in `block (2 levels) in ' 46) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message con_id Failure/Error: its( :con_id ){ is_expected.to be_a Integer } NoMethodError: undefined method `con_id' for nil:NilClass Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:8:in `block (2 levels) in ' 47) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message multiplier Failure/Error: its( :multiplier ){ is_expected.to be_a Integer } NoMethodError: undefined method `multiplier' for nil:NilClass Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:9:in `block (2 levels) in ' 48) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message trading_class Failure/Error: its( :trading_class ){ is_expected.to be_a String } NoMethodError: undefined method `trading_class' for nil:NilClass Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:10:in `block (2 levels) in ' 49) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message exchange Failure/Error: its( :exchange ){ is_expected.to be_a String } NoMethodError: undefined method `exchange' for nil:NilClass Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:11:in `block (2 levels) in ' 50) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message strikes Failure/Error: its( :strikes){ is_expected.to be_an Array } NoMethodError: undefined method `strikes' for nil:NilClass Did you mean? String Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:12:in `block (2 levels) in ' 51) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message expirations Failure/Error: its( :expirations){ is_expected.to be_an Array } NoMethodError: undefined method `expirations' for nil:NilClass Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:13:in `block (2 levels) in ' 52) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message message_id Failure/Error: its(:message_id) { is_expected.to eq 75 } NoMethodError: undefined method `message_id' for nil:NilClass Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:14:in `block (2 levels) in ' 53) IB::Messages::Incoming::OptionChainDefinition Message received from IB behaves like OptionChainDefinition Message buffer Failure/Error: its( :buffer ){ is_expected.to be_empty } NoMethodError: undefined method `buffer' for nil:NilClass Shared Example Group: "OptionChainDefinition Message" called from ./spec/ib/messages/incoming/option_chain_spec.rb:41 # ./spec/ib/messages/incoming/option_chain_spec.rb:15:in `block (2 levels) in ' 54) IB::Messages::Incoming Message received from IB behaves like PositionData message is expected to be a kind of IB::Messages::Incoming::PositionData Failure/Error: it { is_expected.to be_an IB::Messages::Incoming::PositionData } expected nil to be a kind of IB::Messages::Incoming::PositionData Shared Example Group: "PositionData message" called from ./spec/ib/messages/incoming/position_data_spec.rb:36 # ./spec/ib/messages/incoming/position_data_spec.rb:4:in `block (2 levels) in ' 55) IB::Messages::Incoming Message received from IB behaves like PositionData message has class accessors as well Failure/Error: expect( subject.class.message_id).to eq 61 NoMethodError: undefined method `message_id' for NilClass:Class Shared Example Group: "PositionData message" called from ./spec/ib/messages/incoming/position_data_spec.rb:36 # ./spec/ib/messages/incoming/position_data_spec.rb:11:in `block (2 levels) in ' 56) IB::Messages::Incoming Message received from IB behaves like PositionData message message_type Failure/Error: its(:message_type) { is_expected.to eq :PositionData } NoMethodError: undefined method `message_type' for nil:NilClass Shared Example Group: "PositionData message" called from ./spec/ib/messages/incoming/position_data_spec.rb:36 # ./spec/ib/messages/incoming/position_data_spec.rb:5:in `block (2 levels) in ' 57) IB::Messages::Incoming Message received from IB behaves like PositionData message contract Failure/Error: its( :contract ){ is_expected.to be_a IB::Contract } NoMethodError: undefined method `contract' for nil:NilClass Shared Example Group: "PositionData message" called from ./spec/ib/messages/incoming/position_data_spec.rb:36 # ./spec/ib/messages/incoming/position_data_spec.rb:6:in `block (2 levels) in ' 58) IB::Messages::Incoming Message received from IB behaves like PositionData message message_id Failure/Error: its(:message_id) { is_expected.to eq 61 } NoMethodError: undefined method `message_id' for nil:NilClass Shared Example Group: "PositionData message" called from ./spec/ib/messages/incoming/position_data_spec.rb:36 # ./spec/ib/messages/incoming/position_data_spec.rb:7:in `block (2 levels) in ' 59) IB::Messages::Incoming Message received from IB behaves like PositionData message buffer Failure/Error: its( :buffer ){ is_expected.to be_empty } NoMethodError: undefined method `buffer' for nil:NilClass Shared Example Group: "PositionData message" called from ./spec/ib/messages/incoming/position_data_spec.rb:36 # ./spec/ib/messages/incoming/position_data_spec.rb:8:in `block (2 levels) in ' 60) IB::Messages::Incoming::PositionsMulti Message received from IB behaves like Position Message is expected to be a kind of IB::Messages::Incoming::PositionsMulti Failure/Error: it { is_expected.to be_an IB::Messages::Incoming::PositionsMulti } expected nil to be a kind of IB::Messages::Incoming::PositionsMulti Shared Example Group: "Position Message" called from ./spec/ib/messages/incoming/positios_multi_spec.rb:45 # ./spec/ib/messages/incoming/positios_multi_spec.rb:5:in `block (2 levels) in ' 61) IB::Messages::Incoming::PositionsMulti Message received from IB behaves like Position Message has class accessors as well Failure/Error: expect( subject.class.message_id).to eq 71 NoMethodError: undefined method `message_id' for NilClass:Class Shared Example Group: "Position Message" called from ./spec/ib/messages/incoming/positios_multi_spec.rb:45 # ./spec/ib/messages/incoming/positios_multi_spec.rb:12:in `block (2 levels) in ' 62) IB::Messages::Incoming::PositionsMulti Message received from IB behaves like Position Message message_type Failure/Error: its(:message_type) { is_expected.to eq :PositionsMulti } NoMethodError: undefined method `message_type' for nil:NilClass Shared Example Group: "Position Message" called from ./spec/ib/messages/incoming/positios_multi_spec.rb:45 # ./spec/ib/messages/incoming/positios_multi_spec.rb:6:in `block (2 levels) in ' 63) IB::Messages::Incoming::PositionsMulti Message received from IB behaves like Position Message contract Failure/Error: its( :contract ){ is_expected.to be_a IB::Contract } NoMethodError: undefined method `contract' for nil:NilClass Shared Example Group: "Position Message" called from ./spec/ib/messages/incoming/positios_multi_spec.rb:45 # ./spec/ib/messages/incoming/positios_multi_spec.rb:7:in `block (2 levels) in ' 64) IB::Messages::Incoming::PositionsMulti Message received from IB behaves like Position Message message_id Failure/Error: its(:message_id) { is_expected.to eq 71 } NoMethodError: undefined method `message_id' for nil:NilClass Shared Example Group: "Position Message" called from ./spec/ib/messages/incoming/positios_multi_spec.rb:45 # ./spec/ib/messages/incoming/positios_multi_spec.rb:8:in `block (2 levels) in ' 65) IB::Messages::Incoming::PositionsMulti Message received from IB behaves like Position Message buffer Failure/Error: its( :buffer ){ is_expected.to be_empty } NoMethodError: undefined method `buffer' for nil:NilClass Shared Example Group: "Position Message" called from ./spec/ib/messages/incoming/positios_multi_spec.rb:45 # ./spec/ib/messages/incoming/positios_multi_spec.rb:9:in `block (2 levels) in ' 66) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message is expected to be a kind of IB::Messages::Incoming::ReceiveFA Failure/Error: it { is_expected.to be_an IB::Messages::Incoming::ReceiveFA } expected nil to be a kind of IB::Messages::Incoming::ReceiveFA Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/receive_fa_spec.rb:22 # ./spec/account_helper.rb:82:in `block (2 levels) in ' 67) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message has class accessors as well Failure/Error: expect( subject.class.message_id).to eq 16 NoMethodError: undefined method `message_id' for NilClass:Class Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/receive_fa_spec.rb:22 # ./spec/account_helper.rb:89:in `block (2 levels) in ' 68) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message message_type Failure/Error: its(:message_type) { is_expected.to eq :ReceiveFA } NoMethodError: undefined method `message_type' for nil:NilClass Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/receive_fa_spec.rb:22 # ./spec/account_helper.rb:83:in `block (2 levels) in ' 69) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message message_id Failure/Error: its(:message_id) { is_expected.to eq 16 } NoMethodError: undefined method `message_id' for nil:NilClass Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/receive_fa_spec.rb:22 # ./spec/account_helper.rb:84:in `block (2 levels) in ' 70) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message accounts Failure/Error: its(:accounts) {is_expected.to be_an Array} NoMethodError: undefined method `accounts' for nil:NilClass Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/receive_fa_spec.rb:22 # ./spec/account_helper.rb:85:in `block (2 levels) in ' 71) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message buffer Failure/Error: its( :buffer ){ is_expected.to be_empty } NoMethodError: undefined method `buffer' for nil:NilClass Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/receive_fa_spec.rb:22 # ./spec/account_helper.rb:86:in `block (2 levels) in ' 72) IB::Messages::Incoming Message received from IB behaves like Valid Account Object Failure/Error: let( :the_account_object ){ IB::Connection.current.received[:ReceiveFA].first.accounts.first } NoMethodError: undefined method `accounts' for nil:NilClass Shared Example Group: "Valid Account Object" called from ./spec/ib/messages/incoming/receive_fa_spec.rb:24 # ./spec/ib/messages/incoming/receive_fa_spec.rb:25:in `block (4 levels) in ' # ./spec/account_helper.rb:8:in `block (2 levels) in ' # ./spec/account_helper.rb:9:in `block (2 levels) in ' 73) IB::Messages::Incoming Message received from IB behaves like Valid Account Object account Failure/Error: let( :the_account_object ){ IB::Connection.current.received[:ReceiveFA].first.accounts.first } NoMethodError: undefined method `accounts' for nil:NilClass Shared Example Group: "Valid Account Object" called from ./spec/ib/messages/incoming/receive_fa_spec.rb:24 # ./spec/ib/messages/incoming/receive_fa_spec.rb:25:in `block (4 levels) in ' # ./spec/account_helper.rb:8:in `block (2 levels) in ' # ./spec/account_helper.rb:10:in `block (2 levels) in ' 74) IB::Messages::Incoming Message received from IB behaves like Valid Account Object save Failure/Error: let( :the_account_object ){ IB::Connection.current.received[:ReceiveFA].first.accounts.first } NoMethodError: undefined method `accounts' for nil:NilClass Shared Example Group: "Valid Account Object" called from ./spec/ib/messages/incoming/receive_fa_spec.rb:24 # ./spec/ib/messages/incoming/receive_fa_spec.rb:25:in `block (4 levels) in ' # ./spec/account_helper.rb:8:in `block (2 levels) in ' # ./spec/account_helper.rb:11:in `block (2 levels) in ' 75) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message is expected to be a kind of IB::Messages::Incoming::ReceiveFA Failure/Error: it { is_expected.to be_an IB::Messages::Incoming::ReceiveFA } expected nil to be a kind of IB::Messages::Incoming::ReceiveFA Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:22 # ./spec/account_helper.rb:82:in `block (2 levels) in ' 76) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message has class accessors as well Failure/Error: expect( subject.class.message_id).to eq 16 NoMethodError: undefined method `message_id' for NilClass:Class Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:22 # ./spec/account_helper.rb:89:in `block (2 levels) in ' 77) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message message_type Failure/Error: its(:message_type) { is_expected.to eq :ReceiveFA } NoMethodError: undefined method `message_type' for nil:NilClass Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:22 # ./spec/account_helper.rb:83:in `block (2 levels) in ' 78) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message message_id Failure/Error: its(:message_id) { is_expected.to eq 16 } NoMethodError: undefined method `message_id' for nil:NilClass Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:22 # ./spec/account_helper.rb:84:in `block (2 levels) in ' 79) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message accounts Failure/Error: its(:accounts) {is_expected.to be_an Array} NoMethodError: undefined method `accounts' for nil:NilClass Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:22 # ./spec/account_helper.rb:85:in `block (2 levels) in ' 80) IB::Messages::Incoming Message received from IB behaves like ReceiveFA message buffer Failure/Error: its( :buffer ){ is_expected.to be_empty } NoMethodError: undefined method `buffer' for nil:NilClass Shared Example Group: "ReceiveFA message" called from ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:22 # ./spec/account_helper.rb:86:in `block (2 levels) in ' 81) IB::Messages::Incoming Message received from IB behaves like Valid Account Object Failure/Error: let( :the_account_object ){ IB::Connection.current.received[:ReceiveFA].first.accounts.first } NoMethodError: undefined method `accounts' for nil:NilClass Shared Example Group: "Valid Account Object" called from ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:24 # ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:25:in `block (4 levels) in ' # ./spec/account_helper.rb:8:in `block (2 levels) in ' # ./spec/account_helper.rb:9:in `block (2 levels) in ' 82) IB::Messages::Incoming Message received from IB behaves like Valid Account Object account Failure/Error: let( :the_account_object ){ IB::Connection.current.received[:ReceiveFA].first.accounts.first } NoMethodError: undefined method `accounts' for nil:NilClass Shared Example Group: "Valid Account Object" called from ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:24 # ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:25:in `block (4 levels) in ' # ./spec/account_helper.rb:8:in `block (2 levels) in ' # ./spec/account_helper.rb:10:in `block (2 levels) in ' 83) IB::Messages::Incoming Message received from IB behaves like Valid Account Object save Failure/Error: let( :the_account_object ){ IB::Connection.current.received[:ReceiveFA].first.accounts.first } NoMethodError: undefined method `accounts' for nil:NilClass Shared Example Group: "Valid Account Object" called from ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:24 # ./spec/ib/messages/incoming/recieve_multi_account_update_spec.rb:25:in `block (4 levels) in ' # ./spec/account_helper.rb:8:in `block (2 levels) in ' # ./spec/account_helper.rb:11:in `block (2 levels) in ' Finished in 34.3 seconds (files took 0.39796 seconds to load) 461 examples, 83 failures ```
topofocus commented 7 months ago

Thanks for reporting. Are you on the V_10 branch? Row numbers of the spec-files are not fitting. If you want, ping me via signal: +49 176 472 79326, that might be more efficient