lukeorth / poison

Professional Hugo theme for dev bloggers. Based on Mdo's classic Hyde theme.
https://poison.lukeorth.com
GNU General Public License v3.0
209 stars 101 forks source link

ERROR render of "section" #148

Closed coffius closed 11 months ago

coffius commented 11 months ago

I just tried to use this theme with a freshly created site and hugo failed with these errors:

PS C:\dev\blog\tmp_blog> hugo version
hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e windows/amd64 BuildDate=2023-09-24T15:20:17Z VendorInfo=gohugoio

PS C:\dev\blog\tmp_blog> hugo server -w
Watching for changes in C:\dev\blog\tmp_blog\{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in C:\dev\blog\tmp_blog\hugo.toml, C:\dev\blog\tmp_blog\themes\poison\config.toml
Start building sites …
hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e windows/amd64 BuildDate=2023-09-24T15:20:17Z VendorInfo=gohugoio

ERROR render of "section" failed: "C:\dev\blog\tmp_blog\themes\poison\layouts\_default\baseof.html:1:3": execute of template failed: template: _default/list.html:1:3: executing "_default/list.html" at <partial "head/head.html" .>: error calling partial: "C:\dev\blog\tmp_blog\themes\poison\layouts\partials\head\head.html:16:7": execute of template failed: template: partials/head/head.html:16:7: executing "partials/head/head.html" at <partial "head/meta.html" .>: error calling partial: "C:\dev\blog\tmp_blog\themes\poison\layouts\partials\head\meta.html:31:6": execute of template failed: 
template: partials/head/meta.html:31:6: executing "partials/head/meta.html" at <fileExists $image_path_local>: error calling fileExists: CreateFile C:\dev\blog\tmp_blog\assets\%!!(MISSING)s(<nil>): The filename, directory name, or volume label syntax is incorrect.
ERROR render of "taxonomy" failed: "C:\dev\blog\tmp_blog\themes\poison\layouts\_default\baseof.html:1:3": execute of template failed: template: _default/list.html:1:3: executing "_default/list.html" at <partial "head/head.html" .>: error calling partial: "C:\dev\blog\tmp_blog\themes\poison\layouts\partials\head\head.html:16:7": execute of template failed: template: partials/head/head.html:16:7: executing "partials/head/head.html" at <partial "head/meta.html" .>: error calling partial: "C:\dev\blog\tmp_blog\themes\poison\layouts\partials\head\meta.html:31:6": execute of template failed: template: partials/head/meta.html:31:6: executing "partials/head/meta.html" at <fileExists $image_path_local>: error calling fileExists: CreateFile C:\dev\blog\tmp_blog\assets\%!!(MISSING)s(<nil>): The filename, directory name, or volume label syntax is incorrect.
ERROR render of "page" failed: "C:\dev\blog\tmp_blog\themes\poison\layouts\_default\baseof.html:1:3": execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "head/head.html" .>: error calling partial: "C:\dev\blog\tmp_blog\themes\poison\layouts\partials\head\head.html:16:7": execute of template failed: template: partials/head/head.html:16:7: executing "partials/head/head.html" at <partial "head/meta.html" .>: error calling partial: "C:\dev\blog\tmp_blog\themes\poison\layouts\partials\head\meta.html:31:6": execute of template failed: template: partials/head/meta.html:31:6: executing "partials/head/meta.html" at <fileExists $image_path_local>: error calling fileExists: CreateFile C:\dev\blog\tmp_blog\assets\%!!(MISSING)s(<nil>): The filename, directory name, or volume label syntax is incorrect.
Built in 110 ms
Error: error building site: render: failed to render pages: render of "page" failed: "C:\dev\blog\tmp_blog\themes\poison\layouts\_default\baseof.html:1:3": execute of template failed: template: _default/single.html:1:3: executing "_default/single.html" at <partial "head/head.html" .>: error calling partial: "C:\dev\blog\tmp_blog\themes\poison\layouts\partials\head\head.html:16:7": execute of template failed: template: partials/head/head.html:16:7: executing "partials/head/head.html" at <partial "head/meta.html" .>: error calling partial: "C:\dev\blog\tmp_blog\themes\poison\layouts\partials\head\meta.html:31:6": execute of template failed: template: partials/head/meta.html:31:6: executing "partials/head/meta.html" at <fileExists $image_path_local>: error calling fileExists: CreateFile C:\dev\blog\tmp_blog\assets\%!s(<nil>): The filename, directory name, or volume label syntax 
is incorrect.

Any ideas how to fix it?

lukeorth commented 11 months ago

Hi @wasserman - I'm sorry to hear you're experiencing issues.

I tried replicating the issue by:

  1. Updating Hugo to the same version (v0.119.0)
  2. Creating a new site with hugo new site <site_name>
  3. Cloning the Poison theme into /themes
  4. Copying the example Poison config file into hugo.toml
  5. Creating a new post with hugo new content posts/my-first-post.md and setting draft = false
  6. Running the server with hugo server

That said, everything built and ran fine for me. Would it be possible to upload your project to GitHub so I can clone the repository and take a closer look? That might help me troubleshoot a bit better. :)

coffius commented 11 months ago

Checked one more time. Works fine on MacOS but on Windows still there are the same errors.
Preparing a repo with the failing project.

coffius commented 11 months ago

Repo with the failing project is here: https://github.com/coffius/failing_poison_blog

lukeorth commented 11 months ago

Thanks for adding the repo -- that helps. I cloned and ran it on my Ubuntu machine without any issues. You mentioned that it runs fine on MacOS too, so it must be a Windows thing. I unfortunately don't have a Windows OS, so my troubleshooting capabilities are limited.

I did find this issue on another Hugo theme that looks similar to yours. In that case, it was (supposedly) a problem with how Hugo was installed through WSL. Not sure if you're using WSL or not, but you could also try downgrading Hugo to a different version on Windows and seeing if that fixes things.

I would be interested to know if you get similar errors when using a different Hugo theme. If so, it's probably a higher level issue with Hugo (specifically Windows version v0.119.0) and not necessarily the theme itself.

coffius commented 11 months ago

I would be interested to know if you get similar errors when using a different Hugo theme.

Majority of other themes are working for me on Windows without problems.

Not sure if you're using WSL or not, but you could also try downgrading Hugo to a different version on Windows and seeing if that fixes things.

I tried to use WSL(basically Ubuntu's bash) and it works fine there.

I guess the issue can be closed now.

lukeorth commented 11 months ago

Hmmm that's interesting. I'm curious to know what the issue is and if others are experiencing it too. I'll close it for now, but if you find more info or want to troubleshoot it further, feel free to open it back up!

Thanks again, @coffius.