Skip to content
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

Jupyterlab Code Formatter Error in AWS SageMaker Studio #334

Open
Remi-deronzier opened this issue Mar 17, 2024 · 3 comments
Open

Jupyterlab Code Formatter Error in AWS SageMaker Studio #334

Remi-deronzier opened this issue Mar 17, 2024 · 3 comments

Comments

@Remi-deronzier
Copy link

Remi-deronzier commented Mar 17, 2024

Environment

  • JupyterLab version: 4.1.5
  • SageMaker Image version: SageMaker Distribution 1.4
  • jupyterlab-code-formatter version: 2.2.1
  • Execution environment: AWS SageMaker Studio JupyterLab

Issue Description

When attempting to format Python code using the jupyterlab-code-formatter extension within JupyterLab on AWS SageMaker Studio, the formatting action fails and triggers a "Jupyterlab Code Formatter Error, Not Found" error message. This occurs despite the extension appearing as enabled and properly validated within my environment.

Steps to Reproduce

  1. Launch JupyterLab session in AWS SageMaker Studio with the specified environment.
  2. Install jupyterlab-code-formatter version 2.2.1, along with black and isort.
  3. Verify the extension is enabled and validated through jupyter server extension list.
  4. Attempt to format a Python notebook or file using the jupyterlab-code-formatter icon.
  5. Encounter a pop-up error with the message "Jupyterlab Code Formatter Error: Not Found".

Additional Context

  • pip list output: (Included key packages relevant to formatting)
    black 24.3.0
    isort 5.13.2
    jupyterlab 4.1.5
    jupyterlab_code_formatter 2.2.1

  • jupyter server extension list output:
    jupyter_lsp 2.2.4 OK
    jupyter_server_terminals 0.5.3 OK
    jupyterlab 4.1.5 OK
    jupyterlab_code_formatter 2.2.1 OK
    notebook_shim OK

  • CloudWatch log entry on format action:

[W 2024-03-17 21:24:45.363 ServerApp] 404 POST /jupyterlab/default/jupyterlab_code_formatter/format?1710710685265 (6d4625d84adf4485b4ff1c408e6d210f@169.255.255.1) 2.12ms referer=https://1drfn1fzzahuxrg.studio.eu-west-3.sagemaker.aws/jupyterlab/default/...

Despite the extensions being recognized and validated by the server, the formatting request fails. Notably, the environment and installation details have been double-checked for consistency and correctness.

Any guidance on troubleshooting or resolving this issue would be greatly appreciated.

Thanks a lot for your help :)

@SergioG-M
Copy link

Did you find any solution? I am getting the same error

@Remi-deronzier
Copy link
Author

No, unfortunately not. Still the same problem on my side.

@SergioG-M
Copy link

I am surprised that no one else has this problem / care about this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants