Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix yaml scanner error #508

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bleach
Copy link

@bleach bleach commented Sep 5, 2022

This fixes an error that prevents me from loading the "Manipulating Data with dplyr" lesson in the "Getting and Cleaning Data" course.

I'm not the only one suffering from this; it also closes #504 #502 #498

Previously I saw this error:

Error in yaml.load(readLines(con, warn = readLines.warn), error.label = error.label, :
(/home/gdb/R/x86_64-pc-linux-gnu-library/4.2/swirl/Courses/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml) Scanner error: while scanning a tag at line 205, column 9 did not find expected whitespace or line break at line 205, column 19

It looks as though beginning a string with a '!' became problematic. Fixed by adding single quotes.

Previously I saw this error when trying to load the "Manipulating data with
dplyr" lesson:

Error in yaml.load(readLines(con, warn = readLines.warn), error.label = error.label,  :
  (/home/gdb/R/x86_64-pc-linux-gnu-library/4.2/swirl/Courses/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml) Scanner error: while scanning a tag at line 205, column 9 did not find expected whitespace or line break at line 205, column 19

Enclosing the string that starts with a '!' in single quotes fixes this.
@kommaqueen
Copy link

Has this been added? I can't access this lesson for the same error so I'm quite stuck..

@bleach
Copy link
Author

bleach commented Dec 27, 2022

Has this been added? I can't access this lesson for the same error so I'm quite stuck..

@kommaqueen no, it has not been fixed, but you can fix it on your machine yourself by finding where swirl is installed and editing the file swirl/Courses/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml and adding single quotes to line 205, and add single quotes so it looks like this:

Hint: '!is.na(c(3, 5, NA, 10)) will negate the previous command, thus telling us what is NOT NA.'

You should only need to add single quotes; the line should look exactly as above minus the quotes.

@Wutaijing9
Copy link

This fixes an error that prevents me from loading the "Manipulating Data with dplyr" lesson in the "Getting and Cleaning Data" course.

I'm not the only one suffering from this; it also closes #504 #502 #498

Previously I saw this error:

Error in yaml.load(readLines(con, warn = readLines.warn), error.label = error.label, : (/home/gdb/R/x86_64-pc-linux-gnu-library/4.2/swirl/Courses/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml) Scanner error: while scanning a tag at line 205, column 9 did not find expected whitespace or line break at line 205, column 19

It looks as though beginning a string with a '!' became problematic. Fixed by adding single quotes.

@

Has this been added? I can't access this lesson for the same error so I'm quite stuck..

@kommaqueen no, it has not been fixed, but you can fix it on your machine yourself by finding where swirl is installed and editing the file swirl/Courses/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml and adding single quotes to line 205, and add single quotes so it looks like this:

Hint: '!is.na(c(3, 5, NA, 10)) will negate the previous command, thus telling us what is NOT NA.'

You should only need to add single quotes; the line should look exactly as above minus the quotes.

This fixes an error that prevents me from loading the "Manipulating Data with dplyr" lesson in the "Getting and Cleaning Data" course.

I'm not the only one suffering from this; it also closes #504 #502 #498

Previously I saw this error:

Error in yaml.load(readLines(con, warn = readLines.warn), error.label = error.label, : (/home/gdb/R/x86_64-pc-linux-gnu-library/4.2/swirl/Courses/Getting_and_Cleaning_Data/Manipulating_Data_with_dplyr/lesson.yaml) Scanner error: while scanning a tag at line 205, column 9 did not find expected whitespace or line break at line 205, column 19

It looks as though beginning a string with a '!' became problematic. Fixed by adding single quotes.

Your answere was quite helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when running Manipulating Data with dplyr course
3 participants