Showbot icon indicating copy to clipboard operation
Showbot copied to clipboard

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

Open rikai opened this issue 12 years ago • 0 comments

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 }

rikai avatar May 09 '13 20:05 rikai