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

hugo server stops watching when configuration can't be parsed, but is repaired #9486

Closed
davidsneighbour opened this issue Feb 10, 2022 · 2 comments · Fixed by #9487
Closed
Assignees
Milestone

Comments

@davidsneighbour
Copy link
Contributor

davidsneighbour commented Feb 10, 2022

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

hugo v0.92.1-85E2E862+extended linux/amd64 BuildDate=2022-01-27T11:44:41Z VendorInfo=gohugoio

Recreate the issue

  • have a configuration in subdirectory
  • add in config/_default/params.toml a section [something.valid]
  • add a second identical section [something.valid]
  • Hugo prints a warning, but does not indicate failure. (Line "Rebuilt in 55 ms")
  • remove the faulty second line
  • nothing happens on CLI
  • stop Hugo by CTRL+C
  • plenty of errors (everything after "Rebuilt in 55 ms")

In my specific case the section was [dnb.social] so the errors sound out about social, not somthing.

Output

Change of config file detected, rebuilding site.
2022-02-10 20:21:34.313 +0700
ERROR 2022/02/10 20:21:34 Failed to reload config:

ERROR 2022/02/10 20:21:34 "/home/patrick/github.com/davidsneighbour/kollitsch.de/config/_default/params.toml:1:1": failed to unmarshl config for path "/home/patrick/github.com/davidsneighbour/kollitsch.de/config/_default/params.toml": unmarshal failed: toml: table social already exists
Rebuilt in 55 ms
^C^X
^CFatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
  File "/usr/lib/python3.9/site.py", line 606, in <module>
    main()
  File "/usr/lib/python3.9/site.py", line 592, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python3.9/site.py", line 322, in addusersitepackages
    addsitedir(user_site, known_paths)
  File "/usr/lib/python3.9/site.py", line 214, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/usr/lib/python3.9/site.py", line 175, in addpackage
    exec(line)
  File "<string>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 846, in exec_module
  File "<frozen importlib._bootstrap_external>", line 941, in get_code
  File "<frozen importlib._bootstrap_external>", line 1040, in get_data
KeyboardInterrupt
patrick@main:/dev/pts/0>
[20:29:02][patrick@main]  (+1|%0|!2456|)

Also, typo there in failed to unmarshl config for path.

@davidsneighbour
Copy link
Contributor Author

Notes:

  • The server is not dead, it's "detached". I have to kill it manually via killall -9 hugo or the next hugo server run will use a different port
  • The site is not available via web browser after the "Rebuilt in 55ms"

@bep bep removed the NeedsTriage label Feb 10, 2022
@bep bep self-assigned this Feb 10, 2022
@bep bep added this to the v0.93.0 milestone Feb 10, 2022
bep added a commit to bep/hugo that referenced this issue Feb 10, 2022
@bep bep modified the milestones: v0.93.0, v0.92.2 Feb 10, 2022
@bep bep closed this as completed in #9487 Feb 10, 2022
bep added a commit that referenced this issue Feb 10, 2022
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants