Skip to content

Commit

Permalink
Fix bad error message in sniffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed Feb 13, 2012
1 parent 1e3286b commit 6dce25d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion panda/utils/csvdata.py
Expand Up @@ -14,7 +14,7 @@ def sniff_dialect(path, encoding='utf-8'):
try:
csv_dialect = csvkit_sniff(f.read(settings.PANDA_SNIFFER_MAX_SAMPLE_SIZE))
except UnicodeDecodeError:
raise DataSamplingError('This CSV file contains characters that are not %s encoded. You need to input the correct encoding in order to import data from this file.' % (settings.PANDA_SNIFFER_MAX_SAMPLE_SIZE, encoding))
raise DataSamplingError('This CSV file contains characters that are not %s encoded. You need to input the correct encoding in order to import data from this file.' % (encoding))

if not csv_dialect:
raise NotSniffableError('CSV dialect could not be automatically inferred.')
Expand Down

0 comments on commit 6dce25d

Please sign in to comment.