Commit bcc9d9bc authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Don't crash if encoding error

parent 3cceac1c
......@@ -192,7 +192,7 @@ class Validator:
options = {**options, "custom_loaders": loaders.custom_loaders}
report = inspector.inspect(source=source, schema=schema_descriptor, **options)
if report['tables'][0]['format'] == "csv":
if report['tables'][0]['format'] == "csv" and not any(err['code'] == 'source-error' for err in report['tables'][0]['errors']):
scdl_delimiter = ","
detected_delimiter = csv_helpers.detect_dialect(source, **options).delimiter
if detected_delimiter != scdl_delimiter:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment