.Path warning, but deep in AppData

The offending file seems to deep inside AppData… should I go there to paste the replacement code ?

hugo --panicOnWarning
hugo: collected modules in 1739 ms
Start building sites …
hugo v0.92.2-CDF6A0D6+extended windows/amd64 BuildDate=2022-02-11T14:17:39Z VendorInfo=gohugoio
WARN 2022/02/18 22:44:52 .Path when the page is backed by a file is deprecated and will be removed in a future release. We plan to use Path for a canonical source path and you probably want to check the source is a file. To get the current behaviour, you can use a construct similar to the one below:

{{ $path := “” }}
{{ with .File }}
{{ $path = .Path }}
{{ else }}
{{ $path = .Path }}
{{ end }}
Error: Error building site: failed to render pages: render of “page” failed: execute of template failed: template: event/single.html:5:3: executing “event/single.html” at <partial “site_head” .>: error calling partial: “C:\Users\bsure\AppData\Local\Temp\hugo_cache\modules\filecache\modules\pkg\mod\github.com\wowchemy\wowchemy-hugo-modules\wowchemy@v0.0.0-20210526223849-81ba17522966\layouts\partials\site_head.html:33:51”: execute of template failed: template: partials/site_head.html:33:51: executing “partials/site_head.html” at <.Path>: error calling Path: Warning trapped. Remove the --panicOnWarning flag to continue.
Total in 2646 ms

Please raise your issue with the wowchemy team:
https://github.com/wowchemy/wowchemy-hugo-themes/issues/

This may be the same issue:
https://github.com/wowchemy/wowchemy-hugo-themes/issues/2592

Their release notes require:

Hugo Extended 0.87.0 - 0.89.4

You are trying to use v0.92.2.

Thank you so much. I am really new, so could you perhaps quickly tell me how I can use

scoop install git go hugo-extended

to install and use v0.89.4 ? (Windows 10)

Please see the scoop documentation, or raise an issue with the developer:
https://github.com/ScoopInstaller/Scoop/issues

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.