maddox/tvdb_party

TypeError: no marshal_dump is defined for class Proc

Opened this issue · 5 comments

With both ruby 1.8.7 and 1.9.3-p194 I get the following error (after "results = tvdb.search('the west wing')") when trying the example in the README file.

Why is this happening? As far as I could google it, it has to do with a Proc that can't be serialized.
Can this be fixed easily?

TypeError: no marshal_dump is defined for class Proc
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `dump'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `set'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `open'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `set'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:120:in `set'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:93:in `get_with_caching'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:101:in `get'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/search.rb:16:in `search'

Thanks,
Thomas

Ah, found the issue (It's in HTTParty) and this should fix it:
jnunemaker/httparty#152

Was that your issue? I had the same errors but it required a different fix. If that didn't fix it for you, I can submit my patch.

Well, I fixed the error by adding this line before requiring tvdb_party:

gem 'httparty', '=0.8.2'

Ah okay, thanks! That's a lot easier than what I did.

On Fri, Aug 3, 2012 at 2:19 AM, Thomas <
reply@reply.github.com

wrote:

Well, I fixed the error by adding this line before requiring tvdb_party:

gem 'httparty', '=0.8.2'

Reply to this email directly or view it on GitHub:
#9 (comment)

Awesome @tkrajacic ! I had the same problem and downgraded HTTParty to 0.8.2 solved it right away. Thanks!