Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (64 - 66 of 121)

Ticket Resolution Summary Owner Reporter
#108 invalid Setup.py install missing section header error xi anonymous

Reported by anonymous, 5 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!

#183 invalid Simple event generated code fails with MemoryError while around 100 bytes yaml is expected as output xi matkor

Reported by matkor, 2 years ago.

Description

Attached code fails with:

Saving to file: 'test.yaml' Traceback (most recent call last):

File "yaml_test.py", line 40, in <module>

dump_dict(dumper, {"intro":"intro_value", "desc": "long description", "multiline": "line 1\nline2\nline3\n", "binary": binarydata })

File "yaml_test.py", line 15, in dump_dict

dumper.emit( events.ScalarEvent?(anchor=None, tag=None, implicit=(True, False), value=v) )

File "_yaml.pyx", line 1231, in _yaml.CEmitter.emit (ext/_yaml.c:14052) File "_yaml.pyx", line 1153, in _yaml.CEmitter._object_to_event (ext/_yaml.c:13123)

MemoryError?

#17 fixed Single quote character can break emitter output xi apopheniac.reply.pyyaml@…

Reported by apopheniac.reply.pyyaml@…, 7 years ago.

Description

If a string contains a space followed by a single quote character, PyYaml?'s emitter fails to duplicate the single quote. The resulting YAML output yields a parse error:

>>> map = {'key': " 'single quoted text'"}
>>> yaml.dump(map)
"{key: ' 'single quoted text'''}\n"
>>> yaml.load(yaml.dump(map))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/home/apopheniac/lib/python/yaml/__init__.py", line 61, in load
    return loader.get_data()
  File "/home/apopheniac/lib/python/yaml/constructor.py", line 41, in get_data
    return self.construct_document(self.get_node())
  File "/home/apopheniac/lib/python/yaml/composer.py", line 23, in get_node
    return self.compose_document()
  File "/home/apopheniac/lib/python/yaml/composer.py", line 40, in compose_document
    node = self.compose_node(None, None)
  File "/home/apopheniac/lib/python/yaml/composer.py", line 69, in compose_node
    node = self.compose_mapping_node(anchor)
  File "/home/apopheniac/lib/python/yaml/composer.py", line 112, in compose_mapping_node
    while not self.check_event(MappingEndEvent):
  File "/home/apopheniac/lib/python/yaml/parser.py", line 78, in check_event
    self.current_event = self.event_generator.next()
  File "/home/apopheniac/lib/python/yaml/parser.py", line 129, in parse_stream
    for event in self.parse_block_node():
  File "/home/apopheniac/lib/python/yaml/parser.py", line 323, in parse_node
    for event in collection_events:
  File "/home/apopheniac/lib/python/yaml/parser.py", line 472, in parse_flow_mapping
    "expected ',' or '}', but got %r" % token.id, token.start_mark)
yaml.parser.ParserError: while scanning a flow mapping
  in "<string>", line 1, column 1:
    {key: ' 'single quoted text'''}
    ^
expected ',' or '}', but got '<scalar>'
  in "<string>", line 1, column 10:
    {key: ' 'single quoted text'''}
             ^

If each single quote is preceded by a non-space character, then the error disappears:

>>> map = {"key": " foo'single quoted text'"}
>>> yaml.dump(map)
"{key: ' foo''single quoted text'''}\n"
>>> yaml.load(yaml.dump(map))
{'key': " foo'single quoted text'"}

The error seems to lie in the write_single_quoted function of module emitter.py. I've only encountered this problem with scalars represented in single quoted style.

Note: See TracQuery for help on using queries.