Example yaml from yaml.org causes parser error

Issue #43 new
Ben Kehoe
created an issue

The following yaml is from http://www.yaml.org/start.html

--- !clarkevans.com/^invoice
invoice: 34843
date   : 2001-01-23
bill-to: &id001
    given  : Chris
    family : Dumars
    address:
        lines: |
            458 Walkman Dr.
            Suite #292
        city    : Royal Oak
        state   : MI
        postal  : 48046
ship-to: *id001
product:
    - sku         : BL394D
    quantity    : 4
    description : Basketball
    price       : 450.00
    - sku         : BL4438H
    quantity    : 1
    description : Super Hoop
    price       : 2392.00
tax  : 251.42
total: 4443.52
comments: >
    Late afternoon is best.
    Backup contact is Nancy
    Billsmer @ 338-4338.

Causes the following when running yaml.load (or safe_load):

yaml.scanner.ScannerError: while scanning a tag
in "test.yaml", line 1, column 5
expected ' ', but found '^'
in "test.yaml", line 1, column 21

Comments (0)

  1. Log in to comment