You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some tests that use files fail if path to the project contains spaces:
Tests run: 21, Failures: 0, Errors: 21, Skipped: 0, Time elapsed: 3.905 sec <<< FAILURE!
query1(edu.stanford.futuredata.macrobase.sql.MacroBaseSQLTest) Time elapsed: 2.324 sec <<< ERROR!
java.lang.IllegalStateException: File /D:/Some%20Folder/macrobase-master/sql/target/test-classes/1.csv cannot be found
at edu.stanford.futuredata.macrobase.ingest.CSVDataFrameParser.getReader(CSVDataFrameParser.java:140)
at edu.stanford.futuredata.macrobase.ingest.CSVDataFrameParser.<init>(CSVDataFrameParser.java:47)
at edu.stanford.futuredata.macrobase.sql.MacroBaseSQLTest.loadDataFrameFromCSV(MacroBaseSQLTest.java:217)
at edu.stanford.futuredata.macrobase.sql.MacroBaseSQLTest.query1(MacroBaseSQLTest.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.io.FileNotFoundException: D:\Some%20Folder\macrobase-master\sql\target\test-classes\1.csv (The system cannot find the path specified)
at java.io.FileInputStream.open0(Native Method)
...
Something like this seems to work:
--- a/sql/src/test/java/edu/stanford/futuredata/macrobase/sql/MacroBaseSQLTest.java+++ b/sql/src/test/java/edu/stanford/futuredata/macrobase/sql/MacroBaseSQLTest.java@@ -214,7 +214,7 @@ public class MacroBaseSQLTest {
private DataFrame loadDataFrameFromCSV(final String csvFilename,
final Map<String, ColType> schema) throws Exception {
- return new CSVDataFrameParser(Resources.getResource(csvFilename).getFile(), schema).load();+ return new CSVDataFrameParser(Resources.getResource(csvFilename).toURI().getPath(), schema).load();
}
The text was updated successfully, but these errors were encountered:
Some tests that use files fail if path to the project contains spaces:
Something like this seems to work:
The text was updated successfully, but these errors were encountered: