-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Casting/validation gives unexpected errors #72
Comments
@Mikanebu |
@roll 0.2.2 - jsontableschema |
@Mikanebu could you link files / data packages where these errors arise in your description. |
@rufuspollock Spreadsheet for the broken data packages:( Sheet1 has all the errors we fixed, in Sheet2, rows 2-14 have an errors abovementioned) |
@roll I updated issue by providing with exact csv file location, the spreadsheet that I abovementioned is really confusing. If you have any questions, let me know |
@roll do you know when you might be able to confirm these are bugs and, if so, fix them? We have an upstream dependency on this and it would be great to see them fixed 😄 |
@Mikanebu |
I'm on it but seems will release tomorrow not today. @Mikanebu thanks for error message suggestions. I'll integrate it. |
@Mikanebu could you help here with exact failing code example. I can't reproduce it:
// tableschema@1.0.0-alpha.7
const schema = {
fields: [
{
name: 'lang',
description: 'IANA/Unicode language-tag-extension',
type: 'string'
},
{
name: 'langtype',
description: 'ISO 2 letter alpha-2 language code',
type: 'string'
},
{
name: 'territory',
description: 'ISO3166-1-Alpha-2 country code',
type: 'string'
},
{
name: 'revgendate',
description: 'revision date (format ISO data)',
type: 'string'
},
{
name: 'defs',
description: 'number of definitions',
type: 'integer'
},
{
name: 'dftlang',
description: 'indicate the default-language, as unicode-cldr',
type: 'boolean'
},
{
name: 'file',
description: 'file-name of the locale descriptor',
type: 'string'
}
]
}
const data = 'https://raw.githubusercontent.com/datasets/language-codes/master/data/ietf-language-tags.csv'
new tableschema.Table(schema, data).then(async (table) => {
const rows = await table.read()
console.log(rows) // all good
}) |
@Mikanebu I would say it's not a valid geopoint according to the specs:
|
CLOSED in favor of:
Please open new issue if you still experience problems with |
Here are a couple of errors that I think, probably a bug
Wrong type for header: territory and value: 001
It is erroring for both values
001
and"001"
.https://github.com/datasets/language-codes/blob/master/data/ietf-language-tags.csv
"Wrong type for header: coordinates and value: 59.94919968, -151.6959991"
https://raw.githubusercontent.com/datasets/airport-codes/master/data/airport-codes.csv
Also, when I got an error message, it was not clear:
Wrong type for header: Coordinates and value: -14.27667
Suggestion:
Coordinates field cannot accept value -14.27667. Geopoint type should be in the pattern "lon, lat".
Row X is completely blank { "error-count": 1, "headers": [ "Country Name", "Country Code", "Year", "Value" ], "time": 0.406, "row-count": 1000, "source": "gdp/data/gdp.csv", "valid": false }
This error message has unnecassary information and not clear.
Suggestion:
Row X is completely blank. According to the spec it cannot be accept empty rows. Path to source
Row 7 is duplicated to row(s) 6
Same here
When schema type is not type of *array*
.Too much information and not clear.
Suggestion:
Failed validating 'type' in schema['properties']['sources']. Sources property type must be type of array.
AttributeError: 'list' object has no attribute 'split'
Wrong geotype error which is not clear.
Probably it is kind of bug
The text was updated successfully, but these errors were encountered: