Skip to content

"Unable to parse file" exception when trying to open CSV file with many columns #1986

Description

@andrasfuchs

System Information (please complete the following information):

  • Model Builder Version: 16.9.3.2206002
  • Visual Studio Version: 17.0.5

Describe the bug
On the Data tab I browsed for and selected a fairly big .csv file with 42626 columns.
The following exception was thrown after a few seconds and the file was not loaded:

Unable to parse file. Only comma, tab or semi-colon delimited files are allowed.
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__139`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ML.ModelBuilder.Actions.DataTextActions.<GetCsvDataProgramAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ML.ModelBuilder.Actions.DataTextActions.<SetFilePathAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ML.ModelBuilder.ToolWindows.DataTextViewModel.<SetFilePathAsync>d__108.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ML.ModelBuilder.ToolWindows.TextDataControl.<<BrowseFileButton_Click>b__5_0>d.MoveNext()

To Reproduce
Steps to reproduce the behavior:

  1. Go to your project in Solution Explorer
  2. Click on "Add...", "Machine Learning Model"
  3. Select "Data classification", "CPU" to get to the Data tab
  4. Browse for a big file, mine can be downloaded from here.
  5. See the parsing error

Expected behavior
I would expect to load the file so that I can start the training.

Screenshots
image

Additional context
I also had another file with 36537 columns and it was loaded fine.
The file I had the exception with can be downloaded from here: https://drive.google.com/open?id=1DKRabjaiCQ91ydFD35w-VvUDNHOUHreb
I also tried files with even more columns and they failed too.

Metadata

Metadata

Assignees

Labels

Priority:1Work that is critical for the release, but we could probably ship withoutReported by: Customer

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions