Skip to content
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

Yaml format chokes on TSV when detecting #50

Closed
bracki opened this issue Jan 29, 2012 · 1 comment
Closed

Yaml format chokes on TSV when detecting #50

bracki opened this issue Jan 29, 2012 · 1 comment

Comments

@bracki
Copy link
Contributor

bracki commented Jan 29, 2012

See here:

======================================================================
ERROR: Test YAML format detection.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jbrauer/projects/tablib/test_tablib.py", line 486, in test_yaml_format_detect
    self.assertFalse(tablib.formats.yaml.detect(_tsv))
  File "/home/jbrauer/projects/tablib/tablib/formats/_yaml.py", line 58, in detect
    _yaml = yaml.safe_load(stream)
  File "/usr/lib/python2.6/dist-packages/yaml/__init__.py", line 75, in safe_load
    return load(stream, SafeLoader)
  File "/usr/lib/python2.6/dist-packages/yaml/__init__.py", line 58, in load
    return loader.get_single_data()
  File "/usr/lib/python2.6/dist-packages/yaml/constructor.py", line 42, in get_single_data
    node = self.get_single_node()
  File "/usr/lib/python2.6/dist-packages/yaml/composer.py", line 35, in get_single_node
    if not self.check_event(StreamEndEvent):
  File "/usr/lib/python2.6/dist-packages/yaml/parser.py", line 93, in check_event
    self.current_event = self.state()
  File "/usr/lib/python2.6/dist-packages/yaml/parser.py", line 138, in parse_implicit_document_start
    StreamEndToken):
  File "/usr/lib/python2.6/dist-packages/yaml/scanner.py", line 116, in check_token
    self.fetch_more_tokens()
  File "/usr/lib/python2.6/dist-packages/yaml/scanner.py", line 257, in fetch_more_tokens
    % ch.encode('utf-8'), self.get_mark())
ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "<string>", line 1, column 4:
    foo bar
       ^
@kennethreitz
Copy link
Contributor

I merged in your change, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants