Google Drive does not recognise .ipynb file as colab notebook

Viewed 2266

If I create a new Colab notebook in Google Drive, it is recognised as a Colab notebook.

If I upload a .ipynb file into Google Drive, it is not recognised as a Colab notebook.

In the example below, file1.ipynb was created in Google Drive (and is recognised). This file was then downloaded, renamed to file2.ipynb, and then uploaded. The duplicate is not recognised (but you can open and run it in Colab, so the file is OK).

enter image description here What could be wrong?

The JSON in the .ipynb file that is recognised, and the copy that is downloaded and then uploaded is identical.

2 Answers

As mentioned before, Google Colab usually recognizes the .ipynb files that created within itself. Uploading directly to Google Drive or even inside the folder "Colab Notebooks" doesnt't work.

But there is a way to upload .ipynb files to Colab;

  1. Open https://colab.research.google.com
  2. Go to File > Upload Notebook

Notebooks that uploaded with this method will be shown as Colab files in your drive as well, even if you change the location.

I have created a new empty Colab file. Download it. Then upload it to Google Drive again.

The content of the new file and the uploaded file is the same. But the displayed logo is different. So it's not about the content. Google must be tracking which file it create itself from its system, and which file is uploaded.

So, I think it's impossible to find a way to create an ipynb file that will be recognized as Colab.

Related