Invalid taxonomy state + cannot find path + execution failed error code 1

I have been using blogdown::serve_site() to view the effects of saved changes to my files on my site in real-time. I am using Windows 10, Hugo 0.55.6 and the Academic theme with some overides of the layout.

Everything was working wonderfully but I can no longer get serve_site() to work. The last thing I can think of that I was doing prior to the error was adding a new subdirectory resources to the content directory and updating the a Resources menu to point to this directory in config.toml:

# Changed  url = "placeholder/" to url = "resources/"
[[main]]
  name = "Resources"
  url = "resources/"
  weight = 40

Sometime after doing this, I started getting some errors while trying to update my view of the site using serve_site() so I changed the url to url = "rsrcs/" in case the issue was that the resources folder in the root directory was somehow confused with this and causing issues. However, this did not fix the issue. I restarted RStudio, set my working directory to the root directory testing_site (see error message below) containing my cofig.toml, but to no avail, Can someone point me in the right direction?

The error I am receiving is a combination of panic: invalid taxonomy state and execution failed with error code 1 and found below:

blogdown:::serve_site()
Building sites … panic: invalid taxonomy state for “C:\Users\brett\Dropbox\professional\testing_site\content\rsrcs\_index.md” with sections [rsrcs]

goroutine 142 [running]:
github.com/gohugoio/hugo/hugolib.(*HugoSites).createMissingPages(0xc000270600, 0x0, 0x0)
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:666 +0x10fa
github.com/gohugoio/hugo/hugolib.(*HugoSites).assemble(0xc000270600, 0xc001568440, 0xc001581c68, 0x20)
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:251 +0x141
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func2.2()
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:104 +0x43
runtime/trace.WithRegion(0x14f50a0, 0xc00156a480, 0x129dff2, 0x8, 0xc001581d18)
/usr/local/go/src/runtime/trace/annotation.go:137 +0xf0
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func2(0xc000ac3db8, 0x20)
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:106 +0x244
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func3()
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:115 +0x36
runtime/trace.WithRegion(0x14f50a0, 0xc00156a480, 0x129b070, 0x7, 0xc000ac3ec8)
/usr/local/go/src/runtime/trace/annotation.go:137 +0xf0
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build(0xc000270600, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, …)
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:117 +0x7e0
github.com/gohugoio/hugo/commands.(*commandeer).buildSites(…)
/go/src/github.com/gohugoio/hugo/commands/hugo.go:763
github.com/gohugoio/hugo/commands.(*commandeer).fullBuild.func3(0x8, 0x134c5f8)
/go/src/github.com/gohugoio/hugo/commands/hugo.go:313 +0x80
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc00156a450, 0xc001574ac0)
/go/pkg/mod/golang.org/x/sync@v0.0.0-20180314180146-1d60e4601c6f/errgroup/errgroup.go:58 +0x5e
created by golang.org/x/sync/errgroup.(*Group).Go
/go/pkg/mod/golang.org/x/sync@v0.0.0-20180314180146-1d60e4601c6f/errgroup/errgroup.go:55 +0x6d
Building sites … panic: invalid taxonomy state for “C:\Users\brett\Dropbox\professional\testing_site\content\rsrcs\_index.md” with sections [rsrcs]

goroutine 196 [running]:
github.com/gohugoio/hugo/hugolib.(*HugoSites).createMissingPages(0xc00026e880, 0x0, 0x0)
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:666 +0x10fa
github.com/gohugoio/hugo/hugolib.(*HugoSites).assemble(0xc00026e880, 0xc001cc7300, 0xc001cddc68, 0x20)
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:251 +0x141
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func2.2()
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:104 +0x43
runtime/trace.WithRegion(0x14f50a0, 0xc001cc9c80, 0x129dff2, 0x8, 0xc001cddd18)
/usr/local/go/src/runtime/trace/annotation.go:137 +0xf0
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func2(0xc000645db8, 0x20)
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:106 +0x244
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func3()
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:115 +0x36
runtime/trace.WithRegion(0x14f50a0, 0xc001cc9c80, 0x129b070, 0x7, 0xc000645ec8)
/usr/local/go/src/runtime/trace/annotation.go:137 +0xf0
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build(0xc00026e880, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, …)
/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:117 +0x7e0
github.com/gohugoio/hugo/commands.(*commandeer).buildSites(…)
/go/src/github.com/gohugoio/hugo/commands/hugo.go:763
github.com/gohugoio/hugo/commands.(*commandeer).fullBuild.func3(0x8, 0x134c5f8)
/go/src/github.com/gohugoio/hugo/commands/hugo.go:313 +0x80
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc001cc9c50, 0xc001cd4720)
/go/pkg/mod/golang.org/x/sync@v0.0.0-20180314180146-1d60e4601c6f/errgroup/errgroup.go:58 +0x5e
created by golang.org/x/sync/errgroup.(*Group).Go
/go/pkg/mod/golang.org/x/sync@v0.0.0-20180314180146-1d60e4601c6f/errgroup/errgroup.go:55 +0x6d
The system cannot find the path specified.
Error in shell(cmd, mustWork = TRUE, intern = intern) :
‘“C:\Users\brett\AppData\Roaming\Hugo\hugo.exe” -b / -D -F -d “public” --themesDir themes -t hugo-academic’ execution failed with error code 1

UPDATE: I reverted the folder to before changing placehold to resources (as shown in first code snippet), problem still persists. This is also causing serve_site() to not work on any other github repos as well now, including ones working previously. I would say it is an issue with blogdown, but in all cases the error refers to the path mentioned in the first part of the error message and this is not always where the project’s root directory is located.

Hugo uses /content/resources for piping! Chose another directory name!

Hi,

Do you have your code somewhere we can have a look at so we can try and replicate your issue?

UPDATE: this is causing serve_site() to not work on any other github repos as well now, including ones working previously. I would say it is an issue with blogdown, but in all cases the error refers to the path mentioned in the first part of the error message and this is not always where the project’s root directory is located.

@pointyfar Yes, I just threw everything into this public repo on GitHub.

For reference, the code I’m actually running is simply setting the working directory to the local directory for the above repository, loading blogdown, then trying to serve_site():

> setwd("local_repo_directory")
> library(blogdown)
> blogdown::serve_site()

@ju52 Yes, the original post notes I changed that to “rsrcs” to avoid this and the problem persisted. In case any issues were happening, I reverted the entire repository to before I did that - alas, no luck.