Thanks to visit codestin.com
Credit goes to github.com

Skip to content

black 25.9.0 throwing BLK900 Failed to load file: decode_bytes() missing required argument 'mode' (pos 2) #99

@KalebCoberly

Description

@KalebCoberly

Describe the bug

When upgrading to black==25.9.0 (from 25.1.0), I get the following error for every file when running flake8:

BLK900 Failed to load file: decode_bytes() missing 1 required positional argument: 'mode'

To Reproduce

$ pip install black==25.9.0
$ flake8 src/
<for every file in src/> BLK900 Failed to load file: decode_bytes() missing 1 required positional argument: 'mode'
$ pip install black<25.9.0
<Installs 25.1.0>
$ flake8 src/
<no errors>

flake8 and flake8-black (and flake8-*) installed in each scenario are the same, 7.3.0 and 0.3.6 respectively.

Running with a fresh install from black main (pip install -e .[d]) does not fix the issue. (All black tests passed.)

Black pointing to use of unsupported public API: psf/black#4757 (comment)

Expected behavior

No errors.

Environment

  • Black's version: 25.9.0
  • OS and Python version: MacOS Sequoia 15.5/15.7, Tahoe 26.0, Python 3.11-3.13

Additional context

Just started yesterday when unpinned black dependencies started installing 25.9.0 instead of 25.1.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions