Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Problem executing sample code

#8

I've installed the http connector and the gem as documented, but as soon as I run a bit of the sample code, I get an error:

>> require 'quickbooks'
=> true
>> Quickbooks.use_adapter :http, "qbserver","appname","passwd"
=> Quickbooks::Adapters::HttpAdapter::Connection
>> customers = QB::Customer.all
NameError: undefined method `attributes' for class `String'
    from /Library/Ruby/Gems/1.8/gems/quickbooks-0.9.9/lib/quickbooks/type.rb:72:in `method'
    from /Library/Ruby/Gems/1.8/gems/quickbooks-0.9.9/lib/quickbooks/type.rb:72:in `method_missing'
    from /Library/Ruby/Gems/1.8/gems/quickbooks-0.9.9/lib/quickbooks/property.rb:65:in `send'
    from /Library/Ruby/Gems/1.8/gems/quickbooks-0.9.9/lib/quickbooks/property.rb:65:in `method_missing'
    from /Library/Ruby/Gems/1.8/gems/quickbooks-0.9.9/lib/quickbooks/ruby_ext.rb:104:in `parse_xml'
    from /Library/Ruby/Gems/1.8/gems/quickbooks-0.9.9/lib/quickbooks.rb:108:in `send_request'
    from /Library/Ruby/Gems/1.8/gems/quickbooks-0.9.9/lib/quickbooks.rb:127:in `execute'
    from /Library/Ruby/Gems/1.8/gems/quickbooks-0.9.9/lib/quickbooks/model.rb:130:in `all'
    from /Library/Ruby/Gems/1.8/gems/quickbooks-0.9.9/lib/quickbooks/model.rb:129:in `catch'
    from /Library/Ruby/Gems/1.8/gems/quickbooks-0.9.9/lib/quickbooks/model.rb:129:in `all'
    from (irb):3

What am I missing?

Reported by rjmmusic · July 6th, 2009 @ 11:44 PM

State: resolved
Assigned to: Daniel Parker Daniel Parker

Activity

  1. Daniel Parker
    Daniel Parker
    • Tag set to bug
    • State changed from new to open

    July 7th, 2009 @ 09:57 AM

  2. Daniel Parker
    Daniel Parker

    Ron,

    Could you send me (gems [*] behindlogic.com) some text from the connector log? The Connector exe writes a log of everything it does right next to the exe, called application.log. If you can reproduce this error, then exit the Connector from the system tray (to allow it to close the log file) and then grab the latest text (request and response) from that file. If there is any sensitive information in there, feel free to edit it, but I need the overall structure, and if there are any odd characters in a field, etc.

    July 7th, 2009 @ 10:05 AM

  3. Daniel Parker
    Daniel Parker

    Thanks, I downloaded it and then deleted the attachment because that data probably shouldn't be on public internet.

    Did you exit the Connector after the error and before you uploaded the file?

    July 7th, 2009 @ 03:22 PM

  4. Daniel Parker
    Daniel Parker
    • State changed from open to resolved

    Fixed this problem, I believe. It seems to have been an issue of UTF-8 encoding, the Connector was not calculating the correct length of the response xml. It is now fixed to correct any invalid UTF-8, then count the characters correctly.

    July 16th, 2009 @ 02:18 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.