Custom Query (121 matches)


Show under each result:

Results (49 - 51 of 121)

Ticket Resolution Summary Owner Reporter
#82 worksforme PyYAML raises exception on empty files xi Miki Tebeka <miki.tebeka@…>

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

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/", line 66, in load
    return loader.get_data()
  File "/usr/lib/python2.5/site-packages/yaml/", line 38, in get_data
    return self.construct_document(self.get_node())
  File "/usr/lib/python2.5/site-packages/yaml/", line 23, in get_node
    return self.compose_document()
  File "/usr/lib/python2.5/site-packages/yaml/", line 35, in compose_document
    node = self.compose_node(None, None)
  File "/usr/lib/python2.5/site-packages/yaml/", line 52, in compose_node
    anchor = event.anchor
AttributeError: 'NoneType' object has no attribute 'anchor'
#166 wontfix PyYAML should use libyaml if libyaml available xi sgwong

Reported by sgwong, 7 years ago.


Currently PyYAML only use python implementation although the libyaml available. The following simple changes on should do: (I'm not sure whats the use of __with_libyaml__)

__version__ = '3.09'

    from cyaml import *
    __with_libyaml__ = True
    Loader = CLoader
    Dumper = CDumper
except ImportError:
    __with_libyaml__ = False 
#236 invalid PyYAML strips \n in the end of documents xi Matěj Cepl <mcepl@…>

Reported by Matěj Cepl <mcepl@…>, 5 years ago.


When running the attached script the test fails:

mitmanek:yamlish (master) $ python 
FAIL: test_file_output (__main__.TestOuptut)
Traceback (most recent call last):
  File "", line 52, in test_file_output
    """ % (self._expected, got))
AssertionError: Result matches
              expected = {'bill-to': {'address': {'lines': '458 Walkman Dr. Suite #292 '}}, 'comments': 'Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338'}

              observed = {'bill-to': {'address': {'lines': '458 Walkman Dr.\nSuite #292\n'}}, 'comments': 'Late afternoon is best. Backup contact is Nancy Billsmer @ 338-4338\n'}

Ran 1 test in 0.006s

FAILED (failures=1)
mitmanek:yamlish (master) $ 
Note: See TracQuery for help on using queries.