Modify

Ticket #299 (new defect)

Opened 5 months ago

yaml.load fails on multiple documents

Reported by: onlynone@… Owned by: xi
Priority: normal Component: pyyaml
Severity: normal Keywords: load single multiple document
Cc:

Description

The help for yaml.load:

>>> help(yaml.load)
Help on function load in module yaml:

load(stream, Loader=<class 'yaml.loader.Loader'>)
    Parse the first YAML document in a stream
    and produce the corresponding Python object.

Strongly implies that having multiple documents in the stream is not an error. One would assume the documents after the first would just be ignored. However, on attempting to load from a stream with more than one document, the following exception is raised:

ComposerError: expected a single document in the stream
  in "td.yaml", line 2, column 1
but found another document
  in "td.yaml", line 21, column 1

Attachments

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from xi. Next status will be 'new'
The owner will be changed from xi to anonymous. Next status will be 'assigned'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.