Troubleshooting notebooks

Nothing happens after clicking "Open JupyterLab"

Verify that your browser does not block pop-up tabs. JupyterLab opens in a new browser tab.

Downloading files from JupyterLab results in 403 (Forbidden) error

The "notebook" package in the M23 release of Deep Learning VM includes a bug that prevents you from downloading a file using the JupyterLab UI. You can read more about the bug at Cannot download files after JL update and Download file functionality is broken in notebook packages version 5.7.6+ (5.7.7, 5.7.8).

If you are using the M23 release of Deep Learning VM you can resolve the issue in one of two ways:

  • Use a Safari browser. The download functionality works for Safari.

  • Downgrade your notebook package to version 5.7.5.

    To downgrade your notebook package:

    1. Connect to your Deep Learning VM using SSH. For information on connecting to a VM using SSH, see Connecting to instances.

    2. Run the following commands:

      sudo pip3 install notebook==5.7.5
      sudo service jupyter restart
      

Opening a notebook results in a 403 (Forbidden) error

When you click Open JupyterLab to open a notebook, the notebook opens in a new browser tab. If you are signed in to more than one Google account, the new tab opens with your default Google account. If you did not create your notebook instance with your default Google account, the new browser tab will show a 403 (Forbidden) error.

To resolve the issue, follow these steps:

  1. Ensure that your Google account--the account that you were signed-in as when you created your notebook instance--has Editor permission.

    Console

    1. Open the IAM page in the GCP Console.

      Open the IAM page

    2. Verify that the your account is in the Editor role.
    3. If not, edit the your account and add it to the Editor role.

    For more information, see Granting, changing, and revoking access to resources in the Cloud IAM documentation.

    gcloud

    1. If you have not already, install the gcloud command-line tool.

    2. Add the roles/editor role to your account with the following command. Replace PROJECT_ID with the ID of your GCP project, and replace YOUR_GOOGLE_ACCOUNT with the name of your Google account. For example sample-user@gmail.com.

      gcloud projects add-iam-policy-binding PROJECT_ID \
      --member user:YOUR_GOOGLE_ACCOUNT \
      --role roles/editor
      
  2. Open a new instance of your browser and sign into only one Google account--the account that you were signed-in as when you created your notebook instance. Open your JupyterLab notebook from this new browser instance.

New notebook is not created

It usually takes about a minute to create a notebook instance. If your new notebook instance remains in "pending" state indefinitely, it might be because the Compute Engine default service account for your Google Cloud Platform (GCP) project does not have the required Editor permission.

To verify that the Compute Engine default service account for your project has the appropriate permissions, follow these steps:

Console

  1. Open the IAM page in the GCP Console.

    Open the IAM page

  2. Verify that the Compute Engine default service account is in the Editor role.
  3. If not, edit the Compute Engine default service account for your project and add it to the Editor role.

For more information, see Granting, changing, and revoking access to resources in the Cloud IAM documentation.

gcloud

  1. If you have not already, install the gcloud command-line tool.

  2. Get the name and project number for your GCP project with the following command. Replace PROJECT_ID with the project ID for your GCP project.

    gcloud projects describe PROJECT_ID
    

    You should see output similar to the following, which displays the name (name:) and project number (projectNumber:) for your project.

    createTime: '2018-10-18T21:03:31.408Z'
    lifecycleState: ACTIVE
    name: my-project-name
    parent:
     id: '396521612403'
     type: folder
    projectId: my-project-id-1234
    projectNumber: '113377992299'
    
  3. Add the roles/editor role to the Compute Engine default service account for your project with the following command. Replace PROJECT_NAME with the name of your project, and replace PROJECT_NUMBER with the project number for your GCP project.

    gcloud projects add-iam-policy-binding PROJECT_NAME \
     --member serviceAccount:PROJECT_NUMBER-compute@developer.gserviceaccount.com \
     --role roles/editor
    
Was this page helpful? Let us know how we did:

Send feedback about...

AI Platform