jupyterlab-contrib / jupyterlab_code_formatter

A JupyterLab plugin to facilitate invocation of code formatters.
https://jupyterlab-code-formatter.readthedocs.io/
MIT License
855 stars 55 forks source link

Jupyterlab Code Formatter Error - Cannot parse: 2:0: EOF in multi-line statement #323

Closed gnzsnz closed 1 year ago

gnzsnz commented 1 year ago

I just installed jupyterlab code formater through pip install jupyterlab-code-formatter isort black and restarted jupyter lab. I can see on the logs that the extension is loaded correctly

****** ServerApp] Package jupyterlab_code_formatter took 0.0017s to import
****** ServerApp] jupyterlab_code_formatter | extension was successfully linked.
****** ServerApp] Registered jupyterlab_code_formatter server extension
****** ServerApp] jupyterlab_code_formatter | extension was successfully loaded.

however, when i try to format a cell, i get this error

Jupyterlab Code Formatter Error
Cannot parse: 2:0: EOF in multi-line statement

even in a sell with a single line, i get the error message.

I don't get any other message in the logs. And the code in the cell is not formated.

whitish commented 1 year ago

Make sure you installed all the formatters you have in your settings as described in the guide: https://jupyterlab-code-formatter.readthedocs.io/installation.html

gnzsnz commented 1 year ago

hi @whitish , thanks for your reply. I stated in my original comment that I installed all together ie pip install jupyterlab-code-formatter isort black

however I just tried it again in a blank enviroment and now it's working. so there was an error, but is not there anymore. with that i'll close the issue.

thanks for your help