Giter Site home page Giter Site logo

Comments (4)

ryanj avatar ryanj commented on May 29, 2024

Hi Sarvagya,
Thanks for filing this issue, and including a stack trace.

It looks like there is a problem with the format of the API's JSON data, or possibly a bug in 'psych'.
I don't think I can patch this issue from within this codebase, since this project is not responsible for generating or parsing any of the JSON data.

I couldn't reproduce this issue in my local dev environment either. I would recommend trying a different JSON parser, or reporting this issue to Eventbrite's API team (api @ eventbrite.com).

from eventbrite-client.rb.

nickgrim avatar nickgrim commented on May 29, 2024

I had this same problem, with a similar test file. The bug appears to be in Psych, and I fixed it by adding:

YAML::ENGINE.yamler = 'syck'

near the top of my program.

(Inspiration from: http://stackoverflow.com/questions/4980877/rails-error-couldnt-parse-yaml)

from eventbrite-client.rb.

ryanj avatar ryanj commented on May 29, 2024

I never ran into this issue because I was using HTTParty+crack to handle the JSON.
http://railstips.org/blog/archives/2009/04/01/crack-the-easiest-way-to-parse-xml-and-json/

It sounds like the Psych YAML parser might get the job done as well, but only when configured to use the older (unmaintained) 'syck' YAML engine. :(

@nickgrim Thanks for the suggestion and the link!

from eventbrite-client.rb.

ryanj avatar ryanj commented on May 29, 2024

I've updated the requirements to include HTTParty 0.8+, which should fix this issue for everyone - no additional config required.

from eventbrite-client.rb.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.