Reputation: 76
I am trying to update a website using blogdown. However, the rendering fails. The website repo is in this link
When I run blogdown:::serve_site()
, I get the following error:
Start building sites …
ERROR 2020/10/07 15:19:06 open C:\Users\jaime\Documents\R\EstadisticaDescriptiva\public\2020\10\03\estadÃstica-descriptiva-ejercicio\index.html: Access is denied.
ERROR 2020/10/07 15:19:06 open C:\Users\jaime\Documents\R\EstadisticaDescriptiva\public\index.html: Access is denied.
ERROR 2020/10/07 15:19:06 open C:\Users\jaime\Documents\R\EstadisticaDescriptiva\public\post\index.html: Access is denied.
ERROR 2020/10/07 15:19:06 open C:\Users\jaime\Documents\R\EstadisticaDescriptiva\public\categories\index.html: Access is denied.
Total in 366 ms
Error: Error building site: failed to render pages: open C:\Users\jaime\Documents\R\EstadisticaDescriptiva\public\about\index.html: Access is denied.
Start building sites …
ERROR 2020/10/07 15:19:07 open C:\Users\jaime\Documents\R\EstadisticaDescriptiva\public\2020\10\03\estadÃstica-descriptiva-ejercicio\index.html: Access is denied.
ERROR 2020/10/07 15:19:07 open C:\Users\jaime\Documents\R\EstadisticaDescriptiva\public\2020\02\10\estadÃstica-desciptiva-en-python\index.html: Access is denied.
ERROR 2020/10/07 15:19:07 open C:\Users\jaime\Documents\R\EstadisticaDescriptiva\public\post\index.html: Access is denied.
ERROR 2020/10/07 15:19:07 open C:\Users\jaime\Documents\R\EstadisticaDescriptiva\public\categories\index.html: Access is denied.
Total in 390 ms
Error: Error building site: failed to render pages: open C:\Users\jaime\Documents\R\EstadisticaDescriptiva\public\about\index.html: Access is denied.
El sistema no puede encontrar la ruta especificada.
Error in shell(cmd, mustWork = TRUE, intern = intern) :
'"C:\Users\jaime\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" --themesDir themes -t hugo-lithium' execution failed with error code 1
I have tried to create a new website from the beginning, using blogdown::new_site(theme = 'usjrutheiser/hugo-lithium-theme')
, but I get the following error:
Error in if (dir_exists(expdir)) if (theme_example) { :
argument is of length zero
In addition: Warning messages:
1: In download.file(url, output, ..., method = method) :
cannot open URL 'https://github.com/usjrutheiser/hugo-lithium-theme/archive/master.tar.gz': HTTP status was '404 Not Found'
2: In download.file(url, output, ..., method = method) :
cannot open URL 'https://github.com/usjrutheiser/hugo-lithium-theme/archive/master.tar.gz': HTTP status was '404 Not Found'
3: In download.file(url, output, ..., method = method) :
cannot open URL 'https://github.com/usjrutheiser/hugo-lithium-theme/archive/master.tar.gz': HTTP status was '404 Not Found'
4: In utils::untar(zipfile, exdir = tmpdir) :
‘tar.exe -xf "2ff459957c97master.tar.gz" -C "2ff46b705392"’ returned error code 1
I render the site in an old PC with R 3.6.3, and it worked, but in my new PC (R 4.0.2), it does not. Does anyone know what this "Access denied error" means? How can these errors be fixed?
I have used other repository for lithium theme, and I used RStudio for creating it
However, I get the same issue
Congratulations! Your new Hugo site is created in C:\Users\jaime\Documents\R\EjemplosEstadÃstica.
Just a few more steps and you're ready to go:
1. Download a theme into the same-named folder.
Choose a theme from https://themes.gohugo.io/ or
create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".
Visit https://gohugo.io/ for quickstart guide and full documentation.
trying URL 'https://github.com/yihui/hugo-lithium/archive/master.tar.gz'
downloaded 109 KB
processing 7 content files
Error: Failed to save file "C:\\Users\\jaime\\Documents\\R\\EjemplosEstadÃstica\\content\\post\\2016-12-30-hello-markdown.md":: open C:\Users\jaime\Documents\R\EjemplosEstadÃstica\content\post\2016-12-30-hello-markdown.md: Access is denied.
processing 7 content files
Error: Failed to save file "C:\\Users\\jaime\\Documents\\R\\EjemplosEstadÃstica\\content\\post\\2016-12-30-hello-markdown.md":: open C:\Users\jaime\Documents\R\EjemplosEstadÃstica\content\post\2016-12-30-hello-markdown.md: Access is denied.
processing 7 content files
Error: Failed to save file "C:\\Users\\jaime\\Documents\\R\\EjemplosEstadÃstica\\content\\post\\2016-12-30-hello-markdown.md":: open C:\Users\jaime\Documents\R\EjemplosEstadÃstica\content\post\2016-12-30-hello-markdown.md: Access is denied.
Error in shell(cmd, mustWork = TRUE, intern = intern) :
'"C:\Users\jaime\AppData\Roaming\Hugo\hugo.exe" convert toYAML --unsafe' execution failed with error code 65535
Upvotes: 2
Views: 443
Reputation: 76
This kind of problem occurs because the antivirus and the firewall application (I did not tell you that I am using Windows 10). Prevoiusly, I disabled my antivirus software for a while, but it did not work.
The solution was to add an exception not olny for R and RStudio, but also for hugo.exe
.
Best wishes.
Upvotes: 2