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

relax data type for title #271

Closed
fmichonneau opened this issue May 22, 2018 · 2 comments
Closed

relax data type for title #271

fmichonneau opened this issue May 22, 2018 · 2 comments
Milestone

Comments

@fmichonneau
Copy link
Contributor

running make lesson-check on the Spanish lessons lead to the following error messages:

"title" has wrong type in metadata (<type 'unicode'> instead of <type 'str'>)

when the title contains unicode characters such as: "Introducción a R y RStudio"

The unicode characters render fine in jekyll:

screenshot from 2018-05-22 19-45-23

@rgaiacs
Copy link
Contributor

rgaiacs commented May 23, 2018

You are using Python 2 instead of Python 3. In Python 2 you have 'str' (ASCII) and 'unicode' when in Python 3 you only have 'str' and it is Unicode.

Solution Proposal

  1. Remove

    #!/usr/bin/env python
    

    from https://github.com/swcarpentry/styles/blob/gh-pages/bin/lesson_check.py because some machines have Python 2 as default when others have Python 3.

  2. Replace

    @bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md
    

    with

    python3 bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md
    

    in https://github.com/swcarpentry/styles/blob/gh-pages/Makefile#L92. This will make sure that we are using Python 3.

@rgaiacs rgaiacs added this to the v9.4.1 milestone May 23, 2018
@fmichonneau
Copy link
Contributor Author

ha! that's it. I think on the most recent version of the template the script fails without python3 so I normally change the shebang line in the script to

#!/usr/bin/env python3

But I forgot about it this time. I'm not sure if changing the makefile or the shebang line makes a difference, but forcing python3 seems like a good approach.

alanocallaghan pushed a commit to alanocallaghan/carpentries-theme that referenced this issue Apr 3, 2021
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

No branches or pull requests

2 participants