3
0
Fork 0

quickstart: LookupError: No section 'main' (prefixed by 'server') found in config #3

Open
opened 2026-01-02 08:45:20 -06:00 by benjamin · 3 comments
Member

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.conf

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.conf`
Author
Member

Traceback (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

Traceback (most recent call last): File "<string>", line 1, in <module> 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
Owner

Issue here is using the wrong config file; there is a web.conf which should be used for running the web app:

bin/wutta -c app/web.conf webapp -r

Probably something could be improved in the docs etc. but not exactly sure what. Or maybe the wutta webapp command 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.conf to 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:

bin/wutta -c app/wutta.conf webapp -r
bin/wutta webapp -r
Issue here is using the wrong config file; there is a `web.conf` which should be used for running the web app: bin/wutta -c app/web.conf webapp -r Probably something could be improved in the docs etc. but not exactly sure what. Or maybe the `wutta webapp` command 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.conf` to 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: bin/wutta -c app/wutta.conf webapp -r bin/wutta webapp -r
Owner

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:

pip install uvicorn

And then modify your web.conf - first locate the [server:main] section and make note of the port it uses; for instance:

[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 9080

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.

[wutta.web]
app.runner = uvicorn
app.spec = poser.web.app:make_asgi_app
app.factory = true
app.interface = asgi3
app.port = 9080

app.reload_dirs =
        /home/lance/src/wuttjamaican/src/wuttjamaican
        /home/lance/src/wuttaweb/src/wuttaweb
        /home/lance/src/poser/src/poser
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: pip install uvicorn And then modify your `web.conf` - first locate the `[server:main]` section and make note of the port it uses; for instance: ```ini [server:main] use = egg:waitress#main host = 0.0.0.0 port = 9080 ``` 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. ```ini [wutta.web] app.runner = uvicorn app.spec = poser.web.app:make_asgi_app app.factory = true app.interface = asgi3 app.port = 9080 app.reload_dirs = /home/lance/src/wuttjamaican/src/wuttjamaican /home/lance/src/wuttaweb/src/wuttaweb /home/lance/src/poser/src/poser ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: wutta/wuttjamaican#3
No description provided.