Modify

Ticket #242 (new defect)

Opened 13 months ago

Last modified 13 months ago

ScannerError ("could not found expected ':'") on reading map keys longer than 1024 characters

Reported by: ed.brannin@… Owned by: xi
Priority: normal Component: pyyaml
Severity: normal Keywords:
Cc:

Description

I just got this error when reading a YAML map with a very long key:

    "could not found expected ':'", self.get_mark())
yaml.scanner.ScannerError: while scanning a simple key

If I delete the end of the key until it's 1024 characters long, it works.

(In this case, the keys in my map are SSH public keys for a Puppet manifest whose data I'm trying to export into YAML for easier editing.)

Attachments

pyyaml_242.yaml Download (2.2 KB) - added by ed.brannin@… 13 months ago.
Example YAML input that causes the issue
pyyaml_242.py Download (2.5 KB) - added by ed.brannin@… 13 months ago.
PyYAML Test program that displays the issue

Change History

Changed 13 months ago by ed.brannin@…

Example YAML input that causes the issue

Changed 13 months ago by ed.brannin@…

PyYAML Test program that displays the issue

comment:1 Changed 13 months ago by ed.brannin@…

I've attached a sample YAML file and Python script that demonstrate the issue. To see that key length is the issue, delete the end of THIS_IS_A_VERY_LONG_KEY from the start of "START_DELETING_HERE_".

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.