: unknown locale: UTF-8 ValueError
Using Rmd Markdown in Pelican
Updated 2022-05-28: Updated links.
My notebook is dead until I buy a new battery. Now I’m using a lent MacBook Pro for urgent work and I had to install R, RStudio and Stata. After doing the basics I’ve realised a lot of things weren’t working as they were on my laptop.
This blog is based on Pelican. Among other R’s useful packages, I use XLConnect, knitr and rmarkdown that were easy to install without problems and only required Java updates and installing some dependencies from R prompt. The problem came with many errors when I tried to finish a blog entry after writing pelican content
in terminal:
#Starting point These readings were really useful and after I did follow all the steps here I was still obtaining errors. It is very important to follow these steps before reading the rest of this entry.
#Setting up everything The above pages are really clear but I needed to work out a little bit more to obtain an error-free result.
##First error
To solve this part I did follow stackoverflow, but I had to create my own solution which was adding two lines to my .bash_profile
file:
=en_US.UTF-8
export LC_ALL=en_US.UTF-8 export LANG
##Second error Then I tried to finish a blog entry and the results were lots of these after writing pelican content
in terminal:
: Could not process ./file.Rmd
ERROR| TypeError: (u'Pelican does not know how to parse %s', u'/Users/pacha/pachadotdev.github.io/blog/content/file.Rmd')
I had to install stock Python (not OSX pre-installed Python) using homebrew as it is stated in stackoverflow
After installing homebrew I did run these lines in terminal:
-H pip uninstall pelican
sudo
brew install python# should show /usr/local/bin/python
which python -V # Python 2.7.11 in my case
python pip install pelican
Then I did restart my computer and Pelican worked fine.