Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (82 - 84 of 121)

Ticket Resolution Summary Owner Reporter
#103 wontfix example from http://yaml.org/type/yaml.html fails to parse xi py4fun@…

Reported by py4fun@…, 5 years ago.

Description

example from  http://yaml.org/type/yaml.html fails to parse. Is it a wrong example ? (I have found already a few...)

>>> text = open('yaml.yaml').read()
>>> print text
# The following node should NOT be serialized this way.
encoded YAML node :
 !!yaml '!' : '!type'
 !!yaml '&' : 12
 !!value = : value
# The proper way to serialize the above node is as follows:
node : !type &12 value

>>> print yaml.load(text)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\tools\Python25\lib\site-packages\yaml\__init__.py", line 58, in load
    return loader.get_single_data()
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 44, in get_single_data
    return self.construct_document(node)
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 53, in construct_document
    for dummy in generator:
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 404, in construct_yaml_map
    value = self.construct_mapping(node)
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 214, in construct_mapping
    return BaseConstructor.construct_mapping(self, node, deep=deep)
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 139, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 94, in construct_object
    data = constructor(self, node)
  File "C:\tools\Python25\lib\site-packages\yaml\constructor.py", line 420, in construct_undefined
    node.start_mark)
yaml.constructor.ConstructorError: could not determine a constructor for the tag '!type'
  in "<string>", line 7, column 8:
    node : !type &12 value
           ^
>>>
#107 invalid remove unused variable in representer xi py4fun@…

Reported by py4fun@…, 4 years ago.

Description

remove unused list self.object_keeper in representer

Index: C:/projects/workspace_python/PyYAML_2/lib/yaml/representer.py
===================================================================
--- C:/projects/workspace_python/PyYAML_2/lib/yaml/representer.py	(revision 298)
+++ C:/projects/workspace_python/PyYAML_2/lib/yaml/representer.py	(working copy)
@@ -26,14 +26,12 @@
         self.default_style = default_style
         self.default_flow_style = default_flow_style
         self.represented_objects = {}
-        self.object_keeper = []
         self.alias_key = None
 
     def represent(self, data):
         node = self.represent_data(data)
         self.serialize(node)
         self.represented_objects = {}
-        self.object_keeper = []
         self.alias_key = None
 
     def get_classobj_bases(self, cls):
@@ -54,7 +52,6 @@
                 #    raise RepresenterError("recursive objects are not allowed: %r" % data)
                 return node
             #self.represented_objects[alias_key] = None
-            self.object_keeper.append(data)
         data_types = type(data).__mro__
         if type(data) is types.InstanceType:
             data_types = self.get_classobj_bases(data.__class__)+list(data_types)

#108 invalid Setup.py install missing section header error xi anonymous

Reported by anonymous, 4 years ago.

Description

When I try to install pysyck on mac osx 10.5.5 by typing python setup. py install I get the following error:

Traceback (most recent call last):
  File "setup.py", line 121, in <module>
    'build_ext': PySyckBuildExt,
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/core.py", line 125, in setup
    dist.parse_config_files()
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/distutils/dist.py", line 373, in parse_config_files
    parser.read(filename)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py", line 267, in read
    self._read(fp, filename)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ConfigParser.py", line 462, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /Users/s031540/.pydistutils.cfg, line: 1
'{\\rtf1\\ansi\\ansicpg1252\\cocoartf949\\cocoasubrtf350\n'

I used to get another error, syck.h not found, then I made a file in my home folder thanks to xi:

I'd suggest you to create a file named .pydistutils.cfg in your home directory and add the following lines to it:

[build_ext]
include_dirs=/usr/local/include
library_dirs=/usr/local/lib

The Syck.h error disappeared, but I can't get the new one to go away, nor can I find solutions online.

I anybody has any idea, that would be great!

Note: See TracQuery for help on using queries.