quickstart: LookupError: No section 'main' (prefixed by 'server') found in config #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Following the quickstart instructions, when you finally run the wutta executable (wutta -c conf webapp -r), it gives the error
LookupError: No section 'main' (prefixed by 'server') found in config /home/benjamin/playgrounds/playground/wutta/venvs/milksys/app/wutta.confTraceback (most recent call last):
File "", line 1, in
from hupper.ipc import spawn_main; spawn_main(pipe_handle=11)
~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/hupper/ipc.py", line 332, in spawn_main
func(**kwargs)
~~~~^^^^^^^^^^
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/hupper/worker.py", line 286, in worker_main
func(*spec_args, **spec_kwargs)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/pyramid/scripts/pserve.py", line 30, in main
return command.run()
~~~~~~~~~~~^^
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/pyramid/scripts/pserve.py", line 269,
in run
server = server_loader.get_wsgi_server(server_name, config_vars)
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/plaster_pastedeploy/init.py", line 134, in get_wsgi_server
return loadserver(
self.pastedeploy_spec,
...<2 lines>...
global_conf=defaults,
)
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/paste/deploy/loadwsgi.py", line 254, in loadserver
return loadobj(SERVER, uri, name=name, **kw)
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/paste/deploy/loadwsgi.py", line 268, in loadobj
context = loadcontext(
object_type, uri, name=name, relative_to=relative_to, global_conf=global_conf
)
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/paste/deploy/loadwsgi.py", line 293, in loadcontext
return _loaders[scheme](
~~~~~~~~~~~~~~~~^
object_type,
^^^^^^^^^^^^
...<4 lines>...
global_conf=global_conf,
^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/paste/deploy/loadwsgi.py", line 324, in _loadconfig
return loader.get_context(object_type, name, global_conf)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/paste/deploy/loadwsgi.py", line 406, in get_context
section = self.find_config_section(object_type, name=name)
File "/home/benjamin/playgrounds/playground/wutta/venvs/milksys/lib/python3.14/site-packages/paste/deploy/loadwsgi.py", line 594, in find_config_section
raise LookupError(
...<6 lines>...
)
LookupError: No section 'main' (prefixed by 'server') found in config /home/benjamin/playgrounds/playground/wutta/venvs/milksys/app/wutta.conf
Issue here is using the wrong config file; there is a
web.confwhich should be used for running the web app:Probably something could be improved in the docs etc. but not exactly sure what. Or maybe the
wutta webappcommand could do some up-front checking and give more helpful error.. I'll think about that more before closing.Also FYI if you intend for
wutta.confto be your config file, you can just omit that entirely since it's the default, e.g. you would get the above error if you did either of these:One more thing, worth saying here since it's not documented anywhere yet I think.
The default web server is WSGI and a bit sluggish. A much better experience is had if you first:
And then modify your
web.conf- first locate the[server:main]section and make note of the port it uses; for instance:Then somewhere, usually toward the top of the file I'll add something like this (adjust to your preference). The port should match your other section, so it's easier to switch back and forth between the two server options.