HUGO

Permanent server error if Data file has wrong semantics

Hi I am just studying Hugo and faced the following problem:

If I make a semantic error in the file in a Data folder, then the local server issues a render error, which can only be removed by restarting the server. Any content from other sources (pages, configs and so on…) does not cause this behavior. How to deal with this?

hugo server is mainly for dev and not for production.

So when you have an error on your Data, you correct it, and restart the server as we all do :slight_smile:
When all is working you go to production whatever it is, but not hugo in server mode.

HTH.

I’m pretty sure I fixed something similar some time ago… What is the output of hugo version?

Hugo Static Site Generator v0.74.1/extended darwin/amd64 BuildDate: unknown

The error message while semantic mistake:
(For example I’ve made just a string without markup)
ERROR 2020/07/30 20:03:39 Failed to load data: failed to load data: “/Users/popskraft/Google_Drive/hugo/popskraft/data/jazz/bass/johnpatitucci.toml:1:1”: unmarshal failed: Near line 1 (last key parsed ‘’): bare keys cannot contain ‘\x00’

After fix and the file save
Change detected, rebuilding site.

2020-07-30 20:05:39.545 +0600

Data changed “/Users/popskraft/Google_Drive/hugo/popskraft/data/jazz/bass/johnpatitucci.toml”: WRITE

Total in 11 ms

ERROR 2020/07/30 20:05:39 Rebuild failed:

ERROR 2020/07/30 20:05:39 Failed to load data: failed to load data: “/Users/popskraft/Google_Drive/hugo/popskraft/data/jazz/bass/johnpatitucci.toml:1:1”: unmarshal failed: Near line 1 (last key parsed ‘’): bare keys cannot contain ‘\x00’

I’ve made an issue for this bug, few months ago.

Hope this is fixed.
Thank you.