Skip to content
This repository was archived by the owner on Jun 9, 2018. It is now read-only.
This repository was archived by the owner on Jun 9, 2018. It is now read-only.

Word cloud issue: JSON::GeneratorError: NaN not allowed in JSON #54

Description

@rikai

When you first create a database and populate some suggestions, it can't create the clouds. Should probably add some additional code to account for situations like this. trying to view a word cloud will get you a nice fancy error page from JSON::GeneratorError for a while stating: 810: NaN not allowed in JSON

/usr/home/Showbot/showbot_web.rb in to_json
      cloud_data.map do |d|
/usr/home/Showbot/showbot_web.rb in cloud_json
      cloud_data.map do |d|
/usr/home/Showbot/views/clouds_svg.haml in block in singletonclass
  #cloud-data{data: {:'cloud-data' => cloud_json(cloud_data[cloud_index, 1])}}
/usr/home/Showbot/showbot_web.rb in block in <class:ShowbotWeb>
    haml :'clouds_svg', :locals => { cloud_data: WordCount.generate_clouds(suggestion_sets), cloud_index: params[:index].to_i }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions