Skip to main content

VeryA very useful tool and very well programmed. However, it doesn't work with the latest Aug-2012 data dump. Probably XML schema of dumped data changed from the previous version, and now for questions and answers without views, the value for the attribute ViewCount is an empty string. That cause the error mentioned by others in this post "Input string was not in a correct format" when the empty string is trying to be converted into a number (Int32).

SolutionThe solution (that worked for me) was to make a simple modification onto the source code to handle this case.

File SoBase.cs, line 83 show this:

if (attr == null)if (attr == null)

It should be replaced by

if (attr == null || (string.IsNullOrWhiteSpace(attr.Value) && returnType.IsValueType))if (attr == null || (string.IsNullOrWhiteSpace(attr.Value) && returnType.IsValueType))

Thanks Sky Sanders for this awesome tool, performance is very good too!

Very useful tool and very well programmed. However, it doesn't work with latest Aug-2012 data dump. Probably XML schema of dumped data changed from previous version, and now for questions and answers without views, the value for the attribute ViewCount is an empty string. That cause the error mentioned by others in this post "Input string was not in a correct format" when the empty string is trying to be converted into a number (Int32).

Solution (that worked for me) was make a simple modification on the source code to handle this case.

File SoBase.cs, line 83 show this:

if (attr == null)

It should be replaced by

if (attr == null || (string.IsNullOrWhiteSpace(attr.Value) && returnType.IsValueType))

Thanks Sky Sanders for this awesome tool, performance is very good too!

A very useful tool and very well programmed. However, it doesn't work with the latest Aug-2012 data dump. Probably XML schema of dumped data changed from the previous version, and now for questions and answers without views, the value for the attribute ViewCount is an empty string. That cause the error mentioned by others in this post "Input string was not in a correct format" when the empty string is trying to be converted into a number (Int32).

The solution (that worked for me) was to make a simple modification to the source code to handle this case.

File SoBase.cs, line 83 show this:

if (attr == null)

It should be replaced by

if (attr == null || (string.IsNullOrWhiteSpace(attr.Value) && returnType.IsValueType))

Thanks Sky Sanders for this awesome tool, performance is very good too!

Source Link
Lester
  • 131
  • 1

Very useful tool and very well programmed. However, it doesn't work with latest Aug-2012 data dump. Probably XML schema of dumped data changed from previous version, and now for questions and answers without views, the value for the attribute ViewCount is an empty string. That cause the error mentioned by others in this post "Input string was not in a correct format" when the empty string is trying to be converted into a number (Int32).

Solution (that worked for me) was make a simple modification on the source code to handle this case.

File SoBase.cs, line 83 show this:

if (attr == null)

It should be replaced by

if (attr == null || (string.IsNullOrWhiteSpace(attr.Value) && returnType.IsValueType))

Thanks Sky Sanders for this awesome tool, performance is very good too!