-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using black from environment: AttributeError: 'Attribute' object has no attribute 'alias' #452
Comments
It feels like bundled set of libraries is mismatched - changes in the update: further investigation shown that |
Yep, updating However, the issue in general still persists - bundled version of Gosh, I didn't even think before that, how this extension failure would disrupt my everyday work. |
If your environment has one of these packages there make sure it is same or greater than the versions listed here: https://github.com/microsoft/vscode-black-formatter/blob/main/requirements.txt We recommend using the bundled libs. When using black from your environment it can run into problems like this. |
@karthiknadig isn't the point of bundling libs with the extension in making it independent from the environment? |
There are two things here, the server itself needs to communicate with VS Code and that requires
The You can even point it to black binary:
|
ms-python.black-formatter stopped working when using black from the environment.
When I do
> Format Document
, Code says "There is no formatter for 'python' files installed. However, it is installed and active.When I try to
> Black Formatter: Restart Server
, I get the following in the Black Formatter Output console:Black installed in the environment:
VS Code Version:
Extension Version: Both v2024.1.10361006 (pre-release) and v2024.0.0.
(However, it works with the bundled version of black.)
The text was updated successfully, but these errors were encountered: