Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (4 - 6 of 121)

1 2 3 4 5 6 7 8 9 10 11 12
Ticket Resolution Summary Owner Reporter
#82 worksforme PyYAML raises exception on empty files xi Miki Tebeka <miki.tebeka@…>

Reported by Miki Tebeka <miki.tebeka@…>, 6 years ago.

Description
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> fo = open("/dev/null")
>>> import yaml
>>> yaml.load(fo)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/yaml/__init__.py", line 66, in load
    return loader.get_data()
  File "/usr/lib/python2.5/site-packages/yaml/constructor.py", line 38, in get_data
    return self.construct_document(self.get_node())
  File "/usr/lib/python2.5/site-packages/yaml/composer.py", line 23, in get_node
    return self.compose_document()
  File "/usr/lib/python2.5/site-packages/yaml/composer.py", line 35, in compose_document
    node = self.compose_node(None, None)
  File "/usr/lib/python2.5/site-packages/yaml/composer.py", line 52, in compose_node
    anchor = event.anchor
AttributeError: 'NoneType' object has no attribute 'anchor'
>>> 
#8 fixed Comparison operations fail with floats (NaN and +/- Inf) in PyYAML3000 on WinXP (SP2) xi Peter Murphy (pkmurphy@…

Reported by Peter Murphy (pkmurphy@…, 8 years ago.

Description

This is what happens when you run the test suite under WinXP (SP2) and Python 2.4:

C:\pyyaml\trunk>python tests/test_build.py 
..............................................................................................................................................................................................................................................................................F..........................E........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E..........................E............................................................................................................................................................
======================================================================
ERROR: testTypes_float_representer_2_3_bug (test_constructor.TestConstructorTypes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\pyyaml\trunk\tests\test_appliance.py", line 28, in test_method
    getattr(self, '_'+method_name)(test, *filenames)
  File "C:\pyyaml\trunk\tests\test_constructor.py", line 249, in _testTypes
    data1 = list(load_all(file(data_filename, 'rb'), Loader=MyLoader))
  File "build/lib\yaml\__init__.py", line 52, in load_all
    yield loader.get_data()
  File "build/lib\yaml\constructor.py", line 41, in get_data
    return self.construct_document(self.get_node())
  File "build/lib\yaml\constructor.py", line 49, in construct_document
    data = self.construct_object(node)
  File "build/lib\yaml\constructor.py", line 86, in construct_object
    data = constructor(node)
  File "build/lib\yaml\constructor.py", line 63, in <lambda>
    constructor = lambda node: self.yaml_constructors[node.tag](self, node)
  File "build/lib\yaml\constructor.py", line 358, in construct_yaml_map
    return self.construct_mapping(node)
  File "build/lib\yaml\constructor.py", line 153, in construct_mapping
    "found duplicate key", key_node.start_mark)
ConstructorError: while constructing a mapping
  in "tests/data\float-representer-2.3-bug.data", line 2, column 1
found duplicate key
  in "tests/data\float-representer-2.3-bug.data", line 3, column 1

======================================================================
ERROR: testTypes_construct_float (test_representer.TestRepresenterTypes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\pyyaml\trunk\tests\test_appliance.py", line 28, in test_method
    getattr(self, '_'+method_name)(test, *filenames)
  File "C:\pyyaml\trunk\tests\test_representer.py", line 15, in _testTypes
    data2 = load(output, Loader=MyLoader)
  File "build/lib\yaml\__init__.py", line 61, in load
    return loader.get_data()
  File "build/lib\yaml\constructor.py", line 41, in get_data
    return self.construct_document(self.get_node())
  File "build/lib\yaml\constructor.py", line 49, in construct_document
    data = self.construct_object(node)
  File "build/lib\yaml\constructor.py", line 86, in construct_object
    data = constructor(node)
  File "build/lib\yaml\constructor.py", line 63, in <lambda>
    constructor = lambda node: self.yaml_constructors[node.tag](self, node)
  File "build/lib\yaml\constructor.py", line 358, in construct_yaml_map
    return self.construct_mapping(node)
  File "build/lib\yaml\constructor.py", line 154, in construct_mapping
    value = self.construct_object(node.value[key_node])
  File "build/lib\yaml\constructor.py", line 86, in construct_object
    data = constructor(node)
  File "build/lib\yaml\constructor.py", line 63, in <lambda>
    constructor = lam
DATA:
canonical: 6.8523015e+5
exponential: 685.230_15e+03
fixed: 685_230.15
sexagesimal: 190:20:30.15
negative infinity: -.inf
not a number: .NaN

CODE:
{
    "canonical": 685230.15,
    "exponential": 685230.15,
    "fixed": 685230.15,
    "sexagesimal": 685230.15,
    "negative infinity": -1e300000,
    "not a number": 1e300000/1e300000,
}

NATIVES1: [("'canonical'", 685230.15000000002), ("'exponential'", 685230.15000000002), ("'fixed'", 685230.15000000002), ("'negative infinity'", -1.0), ("'not a number'", 1.0), ("'sexagesimal'", 685230.15000000002)]
NATIVES2: [("'canonical'", 685230.15000000002), ("'exponential'", 685230.15000000002), ("'fixed'", 685230.15000000002), ("'negative infinity'", -1.#INF), ("'not a number'", -1.#IND), ("'sexagesimal'", 685230.15000000002)]

DATA:
#0.0:   # hash(0) == hash(nan) and 0 == nan in Python 2.3
1.0: 1
+.inf: 10
-.inf: -10
.nan: 100

CODE:
{
#    0.0: 0,
    1.0: 1,
    1e300000: +10,
    -1e300000: -10,
    1e300000/1e300000: 100,
}

NATIVES1: None
NATIVES2: None

OUTPUT:
{negative infinity: !!float '-1.#INF', not a number: !!float '-1.#IND', sexagesimal: 685230.15000000002,
  fixed: 685230.15000000002, canonical: 685230.15000000002, exponential: 685230.15000000002}

NATIVES1: {'exponential': 685230.15000000002, 'negative infinity': -1.#INF, 'sexagesimal': 685230.15000000002, 'not a number': -1.#IND, 'fixed': 685230.15000000002, 'canonical': 685230.15000000002}
NATIVES2: None

OUTPUT:
{!!float '-1.#IND': 100, .inf: 1, !!float '-1.#INF': -10, !!float '1.#INF': 10}

NATIVES1: {-1.#IND: 100, 1.0: 1, -1.#INF: -10, 1.#INF: 10}
NATIVES2: None
bda node: self.yaml_constructors[node.tag](self, node)
  File "build/lib\yaml\constructor.py", line 259, in construct_yaml_float
    return float(value)
ValueError: invalid literal for float(): 1.#IND

======================================================================
ERROR: testTypes_float_representer_2_3_bug (test_representer.TestRepresenterTypes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\pyyaml\trunk\tests\test_appliance.py", line 28, in test_method
    getattr(self, '_'+method_name)(test, *filenames)
  File "C:\pyyaml\trunk\tests\test_representer.py", line 15, in _testTypes
    data2 = load(output, Loader=MyLoader)
  File "build/lib\yaml\__init__.py", line 61, in load
    return loader.get_data()
  File "build/lib\yaml\constructor.py", line 41, in get_data
    return self.construct_document(self.get_node())
  File "build/lib\yaml\constructor.py", line 49, in construct_document
    data = self.construct_object(node)
  File "build/lib\yaml\constructor.py", line 86, in construct_object
    data = constructor(node)
  File "build/lib\yaml\constructor.py", line 63, in <lambda>
    constructor = lambda node: self.yaml_constructors[node.tag](self, node)
  File "build/lib\yaml\constructor.py", line 358, in construct_yaml_map
    return self.construct_mapping(node)
  File "build/lib\yaml\constructor.py", line 145, in construct_mapping
    key = self.construct_object(key_node)
  File "build/lib\yaml\constructor.py", line 86, in construct_object
    data = constructor(node)
  File "build/lib\yaml\constructor.py", line 63, in <lambda>
    constructor = lambda node: self.yaml_constructors[node.tag](self, node)
  File "build/lib\yaml\constructor.py", line 259, in construct_yaml_float
    return float(value)
ValueError: invalid literal for float(): 1.#IND

======================================================================
FAIL: testTypes_construct_float (test_constructor.TestConstructorTypes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\pyyaml\trunk\tests\test_appliance.py", line 28, in test_method
    getattr(self, '_'+method_name)(test, *filenames)
  File "C:\pyyaml\trunk\tests\test_constructor.py", line 255, in _testTypes
    self.failUnlessEqual(data1, data2)
AssertionError: {'exponential': 685230.15000000002, 'negative infinity': -1.0, 'sexagesimal': 685230.15000000002, 'not a number': 1.0, 'fixed': 685230.15000000002, 'canonical': 685230.15000000002} != {'exponential': 685230.15000000002, 'negative infinity': -1.#INF, 'sexagesimal': 685230.15000000002, 'not a number': -1.#IND, 'fixed': 685230.15000000002, 'canonical': 685230.15000000002}

----------------------------------------------------------------------
Ran 1130 tests in 7.781s

FAILED (failures=1, errors=3)
>Exit code: 1
#37 invalid Cross referenced aliases unsupported ? xi Pwipwi

Reported by Pwipwi, 8 years ago.

Description

Hi, the following doesn't work :

- &element1
  stuff: "Hey !"
  link: *element2 # this causes trouble

- &element2
  stuff: "Ho !"
  link: *element1

Is it normal, or is it just unsupported for now ? It would be nice to have it :)

1 2 3 4 5 6 7 8 9 10 11 12
Note: See TracQuery for help on using queries.