ddavisqa / google-refine

Automatically exported from code.google.com/p/google-refine
0 stars 0 forks source link

org.json.JSONException: JSON does not allow non-finite numbers. #358

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a new project from the attached CSV file.
2. Reconcile the first column using FreeBase reconciliation service and type 
/music/track
3. Export -> Export project

What is the expected output? What do you see instead?

Exported project can not be loaded back into Refine. A "org.json.JSONException: 
JSON does not allow non-finite numbers." is printed in the console while 
exporting.

What version of Google Refine are you using?

trunk@2029

What operating system and browser are you using?

Debian Squeeze, Firefox 3.5.16

Is this problem specific to the type of browser you're using or it happens
in all the browsers you tried?

Not specific.

Please provide any additional information below.

Please find attached a patch that appears to solve this problem. The problem 
appears because the string being reconciliated only contains stop words. In 
that case wordDistance() method returns NaN, which can not be serialized into 
JSON.

Original issue reported on code.google.com by tomazs...@gmail.com on 5 Apr 2011 at 12:47

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by dfhu...@gmail.com on 5 Apr 2011 at 7:15

GoogleCodeExporter commented 8 years ago

Original comment by tfmorris on 6 Jun 2011 at 4:34

GoogleCodeExporter commented 8 years ago
Patch applied.  Thanks Tomaz!  (and thanks for including a test)

Look for it in the 2.1 release candidate which will be out soon.

Original comment by tfmorris on 6 Jun 2011 at 9:32

GoogleCodeExporter commented 8 years ago

Original comment by tfmorris on 9 Jun 2011 at 7:58