wbuchanan/StataJSON

Metadata JavaIOException

Closed this issue · 1 comments

On behalf of Kit Baum:

. sysuse auto
(1978 Automobile Data)

. jsonio, what(record) obid(74)
{
 "mpg" : 17.0,
 "price" : 11995.0,
 "headroom" : 2.5,
 "rep78" : 5.0,
 "length" : 193.0,
 "weight" : 3170.0,
 "displacement" : 163.0,
 "turn" : 37.0,
 "trunk" : 14.0,
 "make" : "Volvo 260",
 "gear_ratio" : 2.9800000190734863,
 "foreign" : 1.0
}
. jsonio, metaprint(varnames)
[ "make", "price", "mpg", "rep78", "headroom", "trunk", "weight", "length", "turn", "displacement", "gear_r
atio", "foreign" ]java.io.FileNotFoundException:  (No such file or directory)
       at java.io.FileOutputStream.open(Native Method)
       at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
       at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
       at com.fasterxml.jackson.core.JsonFactory.createGenerator(JsonFactory.java:1121)
       at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:909)
       at org.paces.Stata.JSON.StataJSON.toJSON(StataJSON.java:455)
       at org.paces.Stata.JSON.StataJSON.printAllToFile(StataJSON.java:213)
r(5100);

. jsonio, metaprint(varlabels)
[ "Make and Model", "Price", "Mileage (mpg)", "Repair Record 1978", "Headroom (in.)", "Trunk space (cu. ft.
)", "Weight (lbs.)", "Length (in.)", "Turn Circle (ft.) ", "Displacement (cu. in.)", "Gear Ratio", "Car t
ype" ]java.io.FileNotFoundException:  (No such file or directory)
       at java.io.FileOutputStream.open(Native Method)
       at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
       at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
       at com.fasterxml.jackson.core.JsonFactory.createGenerator(JsonFactory.java:1121)
       at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:909)
       at org.paces.Stata.JSON.StataJSON.toJSON(StataJSON.java:455)
       at org.paces.Stata.JSON.StataJSON.printAllToFile(StataJSON.java:213)
r(5100);

Patched bug. See commit 88bc31d for further info.