Code Formatter Consistently Failing

Problem description:
In the past few days, while attempting to format the code in one of my files, the formatter has been very incositent in its results. About two thirds of the time, it fails, and in the console shows this:

Formatting main.py with Python3 Language Server.
Formatting failed with message:
undefined

image

Expected behavior:
Code formatting always works, with consistent results.

Actual behavior:
Code formatting works on everything but my one file in on of my repls.

Steps to reproduce:
Not entirely sure. In one of my repls, it has trouble formatting only 1 of my Python files.

Bug appears at this link:
Repl is private.

2 Likes

If you kill 1 the Repl before trying to format it, does it work more often?

1 Like

I think the language server crashed. try installing the language server reload extension (I believe was created by @LuisAFK), or as a temp fix, run kill 1 in the shell.

2 Likes

@Firepup650 @python660 Running kill 1 does not work.

Will look into it.

1 Like

@python660 Couldn’t find any “laungage server reload extension” or even a extension by @LuisAFK that is remotely similar.

3 Likes

Try clicking this button in the IDE and see if it lets you reboot it from there (can’t test it bc mine is active):

image

3 Likes

IIRC it doesn’t, just says it’s off.

1 Like

My LSP extension was probably unpublished due to the recent outage. I’ll redeploy it later.

1 Like

Redeployed: LSP Reloader

1 Like

Just checked. Looks like there is a “reload” button.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.