Skip to content

Calling docbuild config env leads to a tomllib.TOMLDecodeError exception #175

@tomschr

Description

@tomschr

Project Version

0.16.0

Python Version

3.12, 3.13, 3.14

Operating System

Linux, macOS

Steps to Reproduce

  1. Use the etc/docbuild/env.example.toml and changing server.enable_mail from true to True. This will introduce a syntax issue.

  2. Run docbuild with

     docbuild  --env-config=env.devel.toml config env
    

Expected Behavior

There shouldn't be any tracebacks at all. We need to catch the error, present it nicely to the user, and return with a non-zero exit code.

Actual Behavior

When you execute the steps, you receive:

Traceback (most recent call last):
[...]
    raise suffixed_err(src, pos, "Invalid value")
tomllib.TOMLDecodeError: Invalid value (at line 10, column 15)

Additional Information

n/a

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions