You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A user experienced a crash due to a malformed pyproject.toml:
Traceback (most recent call last):
File "/home/user/project/.venv/bin/thx", line 5, in <module>from thx.main import main
File "/home/user/project/.venv/lib/python3.12/site-packages/thx/main.py", line 63, in <module>@click.group(cls=ThxGroup, chain=True, invoke_without_command=True, help=__doc__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/project/.venv/lib/python3.12/site-packages/click/decorators.py", line 238, in decorator
cmd =cls(
^^^^
File "/home/user/project/.venv/lib/python3.12/site-packages/thx/main.py", line 39, in __init__self.config = load_config()
^^^^^^^^^^^^^
File "/home/user/project/.venv/lib/python3.12/site-packages/thx/config.py", line 135, in load_config
data = tomli.loads(content).get("tool", {}).get("thx", {})
^^^^^^^^^^^^^^^^^^^^
File "/home/user/project/.venv/lib/python3.12/site-packages/tomli/_parser.py", line 107, in loads
pos = key_value_rule(src, pos, out, header, parse_float)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/project/.venv/lib/python3.12/site-packages/tomli/_parser.py", line 331, in key_value_rule
pos, key, value = parse_key_value_pair(src, pos, parse_float)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/project/.venv/lib/python3.12/site-packages/tomli/_parser.py", line 374, in parse_key_value_pair
pos, value = parse_value(src, pos, parse_float)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/project/.venv/lib/python3.12/site-packages/tomli/_parser.py", line 621, in parse_valuereturn parse_array(src, pos, parse_float)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/project/.venv/lib/python3.12/site-packages/tomli/_parser.py", line 425, in parse_array
pos, val = parse_value(src, pos, parse_float)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/project/.venv/lib/python3.12/site-packages/tomli/_parser.py", line 654, in parse_valueraise suffixed_err(src, pos, "Invalid value")
tomli.TOMLDecodeError: Invalid value (at line 13, column 5)
The user was not familiar with TOML and made a mistake in editing it. But this error did not guide them towards the root cause and they were unable to self-resolve it.
The text was updated successfully, but these errors were encountered:
amyreese
added a commit
to amyreese/thx
that referenced
this issue
Feb 3, 2025
A user experienced a crash due to a malformed
pyproject.toml
:The user was not familiar with TOML and made a mistake in editing it. But this error did not guide them towards the root cause and they were unable to self-resolve it.
The text was updated successfully, but these errors were encountered: