#8 ✓resolved

Problem executing sample code

Reported by rjmmusic | July 6th, 2009 @ 11:44 PM | in 2.0 - "Ambidextrous Octopus"

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?

Comments and changes to this ticket

  • Daniel Parker

    Daniel Parker July 7th, 2009 @ 09:57 AM

    • Tag set to bug
    • State changed from “new” to “open”
  • Daniel Parker

    Daniel Parker July 7th, 2009 @ 10:05 AM


    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.

  • Daniel Parker

    Daniel Parker July 7th, 2009 @ 03:22 PM

    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?

  • Daniel Parker

    Daniel Parker July 16th, 2009 @ 02:18 PM

    • 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.

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket