Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

How to resolve YAML Error

by Priti24 (Novice)
on Oct 05, 2012 at 12:16 UTC ( #997460=perlquestion: print w/replies, xml ) Need Help??
Priti24 has asked for the wisdom of the Perl Monks concerning the following question:

YAML Error: Stream does not end with newline character\n Code: YAML_ +PARSE_ERR_NO_FINAL_NEWLINE\n Line: 0\n Document: 0\n at /usr/loca +l/share/perl/5.10.1/YAML.pm line 36

i m getting this error When i m trying to execute my program

how to fix this bug? Please help me...

Replies are listed 'Best First'.
Re: How to resolve YAML Error
by moritz (Cardinal) on Oct 05, 2012 at 13:33 UTC
Re: How to resolve YAML Error
by greengaroo (Hermit) on Oct 05, 2012 at 13:43 UTC

    The error is simple. I've seen that many time: Code: YAML_PARSE_ERR_NO_FINAL_NEWLINE

    Just put an extra newline at the end of your YAML file, like this:

    #################################### --- myfile: - you: have to put: a newline character as the last line of this file ####################################

    Of course without the #s!

    Also, if your YAML file is empty, like moritz mentioned, that is wrong too!!

    There are no stupid questions, but there are a lot of inquisitive idiots.
Re: How to resolve YAML Error
by Fletch (Chancellor) on Oct 05, 2012 at 12:55 UTC

    Judging by your code which you've so helpfully provided the error is obviously in the vreemflitzer on line 17.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://997460]
Approved by marto
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2017-04-30 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (534 votes). Check out past polls.