jupytext icon indicating copy to clipboard operation
jupytext copied to clipboard

Jupytext failed to open *.py file as notebook in sagemaker studio aws

Open ihgumilar opened this issue 2 years ago • 13 comments

Hi Team,

I have installed already jupytext, but when I try to open *.py file with jupyter notebook, it throws me an error ( I am using jupyterlab 4 :

image

image

I have installed it in sagemaker studio and also put this code in life cycle configuration as suggested by this forum, but I changed it slightly

#!/bin/bash

set -e

# Install the appropriate version of the Jupytext extension for JupyterLab 3
jupyter labextension install [email protected] 

# Allow Jupyter to open and save notebooks as text files
echo c.NotebookApp.contents_manager_class="jupytext.TextFileContentsManager" >> /home/sagemaker-user/.jupyter/jupyter_notebook_config.py

Note, even though, I remove the configuration file, it still gives me the above error.

I would really appreciate for your help. Thanks a lot for your help :)

ihgumilar avatar Nov 18 '23 11:11 ihgumilar

Hi @ihgumilar , have you installed the Python package? I mean, pip install jupytext<1.16?

Also

  • You don't need the npm extension ([email protected]), it's already in the pip package
  • You don't need to modify your Jupyter configuration (you can remove the line about contents_manager_class)

mwouts avatar Nov 18 '23 11:11 mwouts

Hi @mwouts thanks for the reply. Yes, I installed the package in docker with jupytext 1.15.2

For the last two points, when I excluded them. It still shows the same problem. In fact, I tried to add both of them a bit later after encountering such issue.

Any help ?

ihgumilar avatar Nov 18 '23 12:11 ihgumilar