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

v0.65.1 (ubuntu) panic: runtime error: index out of range [0] with length 0 #6924

knoobie opened this issue Feb 21, 2020 · 1 comment


Copy link

@knoobie knoobie commented Feb 21, 2020

What version of Hugo are you using (hugo version)?

Hugo Static Site Generator v0.65.1 linux/amd64 BuildDate: 2020-02-20T17:50:29Z

Sorry, I can't interpret the exception :/ Yesterday everything was okay.


panic: runtime error: index out of range [0] with length 0

goroutine 48 [running]:*pageState).shiftToOutputFormat(0xc000a34330, 0x1, 0x0, 0xc0009fd798, 0xf78807)
/build/hugo/parts/hugo/build/hugolib/page.go:903 +0x358*pageState).initOutputFormat(0xc000a34330, 0xc0009fd701, 0x0, 0xc0008d4990, 0xc0008d4401)
/build/hugo/parts/hugo/build/hugolib/page.go:448 +0x42*Site).preparePagesForRender.func1(0xc000a34330, 0xf7b2a9)
/build/hugo/parts/hugo/build/hugolib/hugo_sites.go:745 +0x49*pageMap).withEveryBundlePage.func1(0xc0008d2130, 0xd, 0xc0008d43f0, 0xc0009fd9a8)
/build/hugo/parts/hugo/build/hugolib/content_map_page.go:686 +0x37, 0xd, 0x18c24e0, 0xc0008d43f0, 0x1b79956)
/build/hugo/parts/hugo/build/hugolib/content_map.go:852 +0x54, 0xc0009fd938, 0x18c24e0)
/build/hugo/parts/hugo/go/pkg/mod/ +0xf0, 0xc0009fd938, 0x203000)
/build/hugo/parts/hugo/go/pkg/mod/ +0x7e, 0xc0009fd938, 0x0)
/build/hugo/parts/hugo/go/pkg/mod/ +0x7e*Tree).Walk(...)
/build/hugo/parts/hugo/go/pkg/mod/, 0x4, 0x4, 0xc0009fd978)
/build/hugo/parts/hugo/build/hugolib/content_map.go:850 +0x67*pageMap).withEveryBundlePage(0xc0007a5100, 0xc0008839b8)
/build/hugo/parts/hugo/build/hugolib/content_map_page.go:684 +0x6d*Site).preparePagesForRender(0xc00077cb40, 0xc00098b201, 0x0, 0x4, 0xc00098b110)
/build/hugo/parts/hugo/build/hugolib/hugo_sites.go:744 +0x84*HugoSites).render(0xc000748be0, 0xc0006f4b80, 0x42fc6a, 0xc000883c01)
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:294 +0x1cc*HugoSites).Build.func4()
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:133 +0x3c
runtime/trace.WithRegion(0x1fd83e0, 0xc00070ea80, 0x1b85cfc, 0x6, 0xc000883e60)
/snap/go/5364/src/runtime/trace/annotation.go:137 +0x115*HugoSites).Build(0xc000748be0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:135 +0x6d4*commandeer).buildSites(...)
/build/hugo/parts/hugo/build/commands/hugo.go:710*commandeer).fullBuild.func3(0xc000650f68, 0x4)
/build/hugo/parts/hugo/build/commands/hugo.go:322 +0x96*Group).Go.func1(0xc00070ea50, 0xc000716bb0)
/build/hugo/parts/hugo/go/pkg/mod/ +0x64
created by*Group).Go
/build/hugo/parts/hugo/go/pkg/mod/ +0x66

@bep bep added the Bug label Feb 21, 2020
@bep bep added this to the v0.65.2 milestone Feb 21, 2020
@bep bep closed this in 4c2a0de Feb 21, 2020
bep added a commit that referenced this issue Feb 21, 2020
A page needs its output formats even if it should not be rendered or its resources should not be published.

Fixes #6924

This comment has been minimized.

Copy link

@knoobie knoobie commented Feb 21, 2020

@bep Thank you very much for the quick fix! Everything is working again.

@fmotrifork fmotrifork mentioned this issue Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.