Custom Query (121 matches)
Results (52 - 54 of 121)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #62 | fixed | value token of single period ('.') is parsed incorrectly, throws wrong exception | xi | sproaticus |
| Description |
A scalar value token consisting of just a period ('.') is interpreted as a float value. When construct_yaml_float() creates a float using this value, it throws an uncaught ValueError instead of yaml.YAMLError (Also, what's PIL doing in the stack? I didn't import it.) >>> yaml.load('yaml: .')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 66, in load
File "build/bdist.linux-i686/egg/yaml/constructor.py", line 38, in get_data
File "build/bdist.linux-i686/egg/yaml/constructor.py", line 46, in construct_document
File "build/bdist.linux-i686/egg/yaml/constructor.py", line 394, in construct_yaml_map
File "build/bdist.linux-i686/egg/yaml/constructor.py", line 207, in construct_mapping
File "build/bdist.linux-i686/egg/yaml/constructor.py", line 132, in construct_mapping
File "build/bdist.linux-i686/egg/yaml/constructor.py", line 87, in construct_object
File "build/bdist.linux-i686/egg/yaml/constructor.py", line 281, in construct_yaml_float
ValueError: invalid literal for float(): .
Environment:
|
|||
| #63 | invalid | % character cannot start a scalar value token | xi | sproaticus |
| Description |
A scalar value cannot start with a % (percent sign) character, though the YAML specification only reserves that character at the beginning of a non-indented line for directives and tags (see http://yaml.org/spec/current.html#id2523453 and http://yaml.org/spec/current.html#id2524297 ). This character should be legal as the first character of a scalar value, e.g. for Python %s-style string substitution and templates. >>> yaml.load('yaml: %')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 66, in load
File "build/bdist.linux-i686/egg/yaml/constructor.py", line 38, in get_data
File "build/bdist.linux-i686/egg/yaml/composer.py", line 27, in get_node
File "build/bdist.linux-i686/egg/yaml/composer.py", line 34, in compose_document
File "build/bdist.linux-i686/egg/yaml/composer.py", line 63, in compose_node
File "build/bdist.linux-i686/egg/yaml/composer.py", line 112, in compose_mapping_node
File "build/bdist.linux-i686/egg/yaml/composer.py", line 43, in compose_node
File "build/bdist.linux-i686/egg/yaml/parser.py", line 95, in check_event
File "build/bdist.linux-i686/egg/yaml/parser.py", line 446, in parse_block_mapping_value
File "build/bdist.linux-i686/egg/yaml/scanner.py", line 116, in check_token
File "build/bdist.linux-i686/egg/yaml/scanner.py", line 257, in fetch_more_tokens
yaml.scanner.ScannerError: while scanning for the next token
found character '%' that cannot start any token
in "<string>", line 1, column 7:
yaml: %
^
Environment:
|
|||
| #64 | fixed | yaml.dump and indentation: | xi | lal.george@… |
| Description |
In python, when I have : y = {'x' : 3, z : [{'val' : 3}, {'val' : 4}]} yaml.dump(y, default_flow_style=False) The result is: 'x: 3\nz:\n- val: 3\n- val: 4\n' I believe there should be a space before each hypen. Best,
|
|||
