Skip to content

Encounter "Unknown changelog format 'None'" when generating changelog  #894

Description

@gsemet

Description

I have the following error starting 3.12:

poetry run cz changelog \
                --file-name docs/source/changelog.md.sections \
                --unreleased-version UNRELEASED_VERSION
Unknown changelog format 'None'

reverted to 3.11 works fine

Steps to reproduce

poetry run cz changelog \
                --file-name docs/source/changelog.md.sections \
                --unreleased-version UNRELEASED_VERSION

Current behavior

Unknown changelog format 'None'

Desired behavior

changelog well generated

Screenshots

No response

Environment

cz 3.12

Activity

  1. anthonyfinch commented on Nov 3, 2023

    @anthonyfinch

    I have just been bitten by this one too. @gsemet thanks for version workaround, it was blocking our builds!

  2. changed the title [-]Good bug title tells us about precise symptom, not about the root cause.[/-] [+]Encounter "Unknown changelog format 'None'" when generating changelog on Python 3.12[/+] on Dec 3, 2023
  3. changed the title [-]Encounter "Unknown changelog format 'None'" when generating changelog on Python 3.12[/-] [+]Encounter "Unknown changelog format 'None'" when generating changelog [/+] on Dec 3, 2023
  4. Lee-W commented on Dec 3, 2023

    @Lee-W
    Member

    HI @gsemet @anthonyfinch , could you please provide more detail on this issue? I'm not able to reproduce it. Might need to know how the changelog looks like and what are some of the example commits

  5. bearomorphism commented on May 9, 2026

    @bearomorphism
    Collaborator

    Triage from #1964: Still valid on master (4.15.1). commitizen/changelog_formats/__init__.py (lines 73-78) raises ChangelogFormatUnknown('None') if changelog_format isn't set and the filename's extension isn't recognised (e.g. changelog.md.sections). Workaround: set changelog_format = "markdown" in your config. Long-term fix: better error message ("Set changelog_format explicitly when using a non-standard file extension") and/or default to markdown.

  6. bearomorphism commented on May 9, 2026

    @bearomorphism
    Collaborator

    Verification update (re #1964)

    Reproduced against current master (4.15.1):

    cz changelog --file-name docs/source/changelog.md.sections --dry-run --unreleased-version UNRELEASED_VERSION exits with code 29:

    Unknown changelog format 'None'
    

    Workaround confirmed: adding changelog_format = "markdown" to [tool.commitizen] fixes it (exit 0, changelog generated correctly).

    Verdict: STILL VALID. Suggested fixes:

    1. Better error message: "Cannot infer changelog format from filename '<filename>'. Set 'changelog_format' explicitly in your config (e.g., 'markdown')."
    2. Default to markdown when guessing fails (least surprising for most users).
    3. Document the changelog_format setting more prominently for non-standard filename use cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions