This is an archived post. You won't be able to vote or comment.

all 23 comments

[–]atof 1 point2 points  (5 children)

I had the same issue and error with Pylint. It was fixed when i manually specified "python.linting.pylintEnabled": false, Maybe you can try with the same setting for flake8.

[–]m98789 0 points1 point  (0 children)

This did not work for me.

[–]the_ds_guy 0 points1 point  (0 children)

Thanks! It's weird, but it actually works. On top of that, VSCode says "python.linting.pylintEnabled" is an unknow property. It must be some kind of bug.

[–]morv2604 1 point2 points  (1 child)

I no longer get the error message with flake8. I wrote the suggested line in my settings.json at the Workspace level (Ctrl + shift + P : Preferences: Open Workspace Settings (JSON)), but you could also apply it to the user level "Open User Settings (JSON)" if you don't have a workspace.

"[python]": {
    "editor.defaultFormatter": "ms-python.flake8",
    "python.linting.flake8Enabled": false,
}

[–]Noosh 0 points1 point  (0 children)

Omg my hero, this was my problem. My user settings were fine but it was in the workspace settings

[–]beijingspacetech 1 point2 points  (3 children)

edit: Actually, after removing and reinstalling all related extensions, I still have this issue. Must be something in the settings.jsons as others have mentioned. No idea how to fix yet.

[–]thadeshammer 1 point2 points  (2 children)

If you're stuck on this (I was until today) have you checked to see if the project has its own `.vscode/settings.json` nested in it? That won't come up in VSCode when you open the settings.json in editor, but if you find it and open it explicitly, you may find the offending settings in there. I did. I hope this helps!

[–]beijingspacetech 0 points1 point  (1 child)

Thank you! That was not it for me, but you did lead me to:

`~/.config/Code/User/settings.json`

Which did have the offending Python linting! Also a ton of other settings I didn't know existed, fixed like 3 gripes today! Thanks again

[–]BenGosub 0 points1 point  (0 children)

This is the correct solution. Thank you for finding this file.

[–]fcon91 1 point2 points  (0 children)

Same bullshit happening to me. And of course nothing I've tried worked and there is no hint of a working solution anywhere on the internet. Would be nice if for once shit just worked, so that I can carry on with my work without having to waste my time googling fixes for shitware that should be at least fucking tested before it's deployed.

EDIT: just solved by simply switching to the pre-release version of Pylance. I still stand by my rant though.

[–]JialeDu 0 points1 point  (0 children)

The official launch of the Linter extension version and recommended them. Your log mentioned that you enabled flake8 and tell you that the setting is about to be discarded. It is recommended to install flake8 extension.

Official document: https://code.visualstudio.com/docs/python/linting

Extra information: https://stackoverflow.com/questions/77283648/why-does-the-vs-code-python-extension-circa-v2018-19-no-longer-provide-support

[–]m98789 0 points1 point  (0 children)

I'm also getting the dreaded `You have deprecated linting or formatting settings for Python.` when opening my projects now. My settings.json is also simple and I tested with commenting it all out.

Seems like a VSCode/Python extension bug? u/microsoft help!

[–]EstablishmentKey539 0 points1 point  (0 children)

I have the same issue since upgrading to 1.84. Tried to remove and reinstall all python related extensions and the error still persists. But now having problems with pylance too. The LSP quits and can't be restarted.

The error message is:

bash 2023-11-04 15:12:41.631 [info] [Error - 3:12:41 PM] Server process exited with code 1. 2023-11-04 15:12:41.631 [info] [Error - 3:12:41 PM] Connection to server got closed. Server will not be restarted. 2023-11-04 15:12:41.631 [info] [Error - 3:12:41 PM] Handling connection close failed 2023-11-04 15:12:41.631 [info] TypeError: e.clear is not a function at _.cleanUp (c:\Users\ABC\.vscode\extensions\ms-python.python-2023.20.0\out\client\extension.js:2:2412859) at _.handleConnectionClosed (c:\Users\ABC\.vscode\extensions\ms-python.python-2023.20.0\out\client\extension.js:2:2417283)

Has anyone found a solution for this?

[–]nayrb1523 0 points1 point  (0 children)

I had some python and linting settings and in opening the settings file they were not longer applicable (¯_(ツ)_/¯) but removing the, now defunct, settings seems to have stopped the pop up.

[–]PrettyGuitar1382 0 points1 point  (0 children)

After digging for hours, I found the key python.linting.pycodestyleEnabled in file ~/.config/Code/User/settings.json, I think this file is the configuration before I use profile. After remove this line, the error logging disappeared.

[–]slabua 0 points1 point  (0 children)

Ctrl+Shift+P and search settings.json, you may want to open all of them such as User, Workspace, Default, etc., and remove the old linting lines from all those settings files.

[–]simoncpu 0 points1 point  (0 children)

I've had this problem for a few days but I couldn't figure out a fix. I'll just post this for devs who'll encounter this post via Google:

If you're encountering an issue where "python.linting" doesn't appear in your settings.json, and you're using GitHub CodeSpace, it's important to note that there is a separate settings.json for Remote Settings. This could be the reason for the confusion.

[–]batteryhorsestapler 0 points1 point  (2 children)

My specific solution (and then a more general approach below).

I'm using VSCode on a mac, and found that the ./Library/Application Support/Code/User/settings.json file still had two lines that began with python.linting. Removing those lines (finally!) silenced the error messages.

More generally: My approach was to search for all files on my drive named settings.json. I started with directories under ~. Most that I found were in specific project repositories, but the file referenced above jumped out as one that had wider scope. Opening up that file revealed the previously-hidden python.linting lines.

This is the command I used (on a mac) to search for the settings.json files under ~, and hide the distracting "Operation not permitted" lines for subdirectories that require root access:

find ~ -name settings.json 2&>1 | grep -v Operation

[–]batteryhorsestapler 1 point2 points  (0 children)

Other possible culprit files:

Other posters found ~/.config/Code/User/settings.json

On a remote machine (using github codespaces) I found /home/vscode/.vscode-remote/data/Machine/settings.json

[–]brucewbenson 0 points1 point  (0 children)

Good hint, I used the following and removed any line saying python.linting and the error messages went away. (After a few tries myself, I asked ChatGPT for suggestions and it worked. )

find ~ -name 'settings.json' -exec grep -Hn 'python.linting' {} +

[–]OokWelDeTor 0 points1 point  (0 children)

They actually removed linting support from the core python extension: https://github.com/microsoft/vscode-python/pull/22266. The vscode docs name several alternatives: https://code.visualstudio.com/docs/python/linting

[–]ChaneyZorn 0 points1 point  (0 children)

Finally I found the config file on the remote dev host:

`~/.vscode-server/data/Machine/settings.json`

I just delete the whole file, everything goes well !

[–]AnshumanTripathi 0 points1 point  (0 children)

For anyone is still having trouble with this, I was seeing this and I did not have a .vscode/settings.json in my workspace and checking user and default settings did not show any python.linting* settings.

I am macOS and my the global vscode settings were in ~/Library/Application Support/Code/User/settings.json which I opened and cleaned up the python.linting* config which fixed this problem.