Bookdown: In readLines(con) : incomplete final line found on '_bookdown.yml'

Hi

I am trying to make a gitbook using bookdown. But I get the following error, that I do not understand how to resolve.

In readLines(con) : incomplete final line found on '_bookdown.yml'

In my _bookdown.yml, I have just three lines

book_filename: "AMA Model"
chapter_name: "Section "
output_dir: docs

I have a docs folder in the same folder as _bookdown.yml

Please guide (the complete error is below)

thank you
Ram

Output created: docs/index.html
Warning messages:
1: In readLines(con) : incomplete final line found on '_bookdown.yml'
2: In readLines(input, encoding = "UTF-8") :
incomplete final line found on './_output.yml'
3: In readLines(con) : incomplete final line found on '_bookdown.yml'
4: In readLines(input, encoding = "UTF-8") :
incomplete final line found on '_output.yml'

I think you need to add a trailing line (one extra line) after the end of the code.

9 Likes

Aha, that was easy :slight_smile: thank you.

1 Like

I meet the same problem as yours. Did you just add a space or tab at the end of the third line?

Add a blank line at the end of the file.

1 Like