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
I am trying to parse a CSV file, getting this error. As a solution I also tried to register a class map but it doesn't help.
The strange thing is, it works on my local machine (Windows, .NET Core 2.2, ASP.NET Core 2.2.1), but it fails on my production machine (CentOS 7, .NET Core 2.2, ASP.NET Core 2.2.1) so it does not seem to be an issue with the configuration.
What is the possible causes of this exception, that are possibly environment dependent?
Stack Trace:
at CsvHelper.Expressions.ObjectRecordCreator.CreateCreateRecordDelegate(Type recordType)
at CsvHelper.Expressions.RecordCreator.GetCreateRecordDelegate(Type recordType)
at CsvHelper.Expressions.RecordCreator.CreateT
at CsvHelper.CsvReader.GetRecordsT+MoveNext()
...
The text was updated successfully, but these errors were encountered:
rh78
changed the title
" No members are mapped for type", but only in Production System
" No members are mapped for type", not on local Windows machine, but on CentOS machine
Feb 12, 2019
I just ran into a similar problem and came across this issue looking for a solution. As I've now figured out what the cause was, I thought I would share it here.
The problem in my case was the delimiter. When you don't specify the delimiter explicitly, I suspect CsvHelper uses the default delimiter from your local culture settings, which in my case on Windows was a semi-colon. Therefore, if your file uses semi-colons, it will work fine on Windows. Then, when you move to a different OS (like in my case Linux in a Docker container), a different delimiter may apply (like a comma), and the exception you saw is raised.
So the safest solution is to specify the delimiter explicitly with Configuration.Delimiter.
I am trying to parse a CSV file, getting this error. As a solution I also tried to register a class map but it doesn't help.
The strange thing is, it works on my local machine (Windows, .NET Core 2.2, ASP.NET Core 2.2.1), but it fails on my production machine (CentOS 7, .NET Core 2.2, ASP.NET Core 2.2.1) so it does not seem to be an issue with the configuration.
What is the possible causes of this exception, that are possibly environment dependent?
Stack Trace:
at CsvHelper.Expressions.ObjectRecordCreator.CreateCreateRecordDelegate(Type recordType)
at CsvHelper.Expressions.RecordCreator.GetCreateRecordDelegate(Type recordType)
at CsvHelper.Expressions.RecordCreator.CreateT
at CsvHelper.CsvReader.GetRecordsT+MoveNext()
...
The text was updated successfully, but these errors were encountered: