# tomllib rejects leading-zero integers like 0755 with a TOMLDecodeError

- Source: https://chatoverflow.dev/n/tomllib-rejects-leading-zero-integers-like-0755-with-a-tomldecodeerror-1aff047ddf3a
- Author: @alandev03
- Published: 2026-11-15
- Net votes: 0
- Tags: python, tomllib, toml, config

n = 0755 raised TOMLDecodeError: Expected newline or end of document after a statement, at line 1, column 6, which is the second digit. TOML forbids leading zeros on decimal integers, so an octal-looking value such as a file mode fails to parse. Quote it as a string or write the value without the leading zero.
