Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (61 - 63 of 121)

Ticket Resolution Summary Owner Reporter
#50 fixed ScannerError TypeError xi edemaine@…

Reported by edemaine@…, 7 years ago.

Description

I encountered a small bug in error reporting with the libyaml interface:

## A "real-world" example: mistaken input HTML instead of YAML.
>>> x='<HTML>\n  <HEAD>\n    <STYLE>\n      TABLE { border-collapse: collapse; }\n    </STYLE>\n  </HEAD>\n</HTML>'

>>> yaml.load(x)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/__init__.py", line 66, in load
    return loader.get_data()
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/constructor.py", line 38, in get_data
    return self.construct_document(self.get_node())
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/composer.py", line 27, in get_node
    return self.compose_document()
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/composer.py", line 37, in compose_document
    self.get_event()
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/parser.py", line 115, in get_event
    self.current_event = self.state()
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/parser.py", line 186, in parse_document_end
    token = self.peek_token()
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/scanner.py", line 128, in peek_token
    self.fetch_more_tokens()
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/scanner.py", line 220, in fetch_more_tokens
    return self.fetch_value()
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/scanner.py", line 579, in fetch_value
    self.get_mark())
yaml.scanner.ScannerError: mapping values are not allowed here
  in "<string>", line 4, column 30:
          TABLE { border-collapse: collapse; }
                                 ^
## great error reporting

>>> yaml.load(x,yaml.CLoader)                                                   Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/__init__.py", line 66, in load
    return loader.get_data()
  File "/toc/home/edemaine/Packages/lib/python2.6/site-packages/yaml/constructor.py", line 38, in get_data
    return self.construct_document(self.get_node())
  File "_yaml.pyx", line 664, in _yaml.CParser.get_node
  File "_yaml.pyx", line 669, in _yaml.CParser._compose_document
  File "_yaml.pyx", line 848, in _yaml.CParser._parse_next_event
TypeError: exceptions must be strings, classes, or instances, not ScannerError
## not so useful--seems to be a bug

I didn't investigate why ScannerError is considered to be a class in the first case but not the second; perhaps _yaml defines its own ScannerError? type? Should probably just use yaml.scanner.ScannerError instead.

#66 worksforme ScannerError in fetch_more_tokens xi Takanao Endoh <djmchl@…>

Reported by Takanao Endoh <djmchl@…>, 7 years ago.

Description
>>> import yaml
>>> yaml.load(" 'spam: %' ")
'spam: %'
>>> yaml.load(" spam: % ")
------------------------------------------------------------
Traceback (most recent call last):
  ...
  File "/Volumes/data/pylib/src/yaml/scanner.py", line 257, in fetch_more_tokens
    % ch.encode('utf-8'), self.get_mark())
ScannerError: while scanning for the next token
found character '%' that cannot start any token
  in "<string>", line 1, column 8:
     spam: % 
           ^
#177 fixed Secirity risk: easy_install reads a wiki page to get tarball path xi upadhyay@…

Reported by upadhyay@…, 4 years ago.

Description

This is a *huge* security risk. Anyone can modify the wiki page: http://pyyaml.org/wiki/PyYAML, adding a malicious tarball location, that will be downloaded by easy_install and run as root on everyone who tries to install PyYAML.

At the very least please make the wiki page editable by only few people. Or make the pypi download location point to something more "reliable".

Note: See TracQuery for help on using queries.