googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.18k stars 709 forks source link

Saving to GitHub #1975

Open vijaychsk opened 3 years ago

vijaychsk commented 3 years ago

Bug report for Colab: http://colab.research.google.com/.

Issue: I opened a notebook that belongs to someone else. I tried to save a copy of it to my GitHub repository. But it is not working. The save fails because the Colab is trying to save it in the source where I don't have write access.

Error Snippet: Failed to save notebook to https://github.com/tinyMLx/colabs/blob/master/2-1-4-ExploringLoss.ipynb CustomError: Failed to save notebook to https://github.com/tinyMLx/colabs/blob/master/2-1-4-ExploringLoss.ipynb at new JA (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:1389:22) at za.program_ (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:1395:315) at Ba (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:19:336) at za.throw_ (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:18:403) at Ca.throw (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:20:248) at g (https://colab.research.google.com/v2/external/external_polymer_binary.js?vrz=colab-20210420-060103-RC00_369390986:62:155)

Expected behavior: When the "Save a copy in GitHub" is clicked, Colab should show me the repositories, where users have write access to save a copy. If not, I should be able to input the repository path to save. Instead of showing the source repository.

Steps to reproduce:

  1. Open this link: https://colab.research.google.com/github/tinyMLx/colabs/blob/master/2-1-4-ExploringLoss.ipynb
  2. File > Save a copy to GitHub
  3. You'll not see your public/private repository to choose to save.

Browser Used:

NOTES:

UmerFakher commented 3 years ago

I have re-created this issue. Whenever I "Save a copy to GitHub" it seems the problem is that it doesn't not change the name in this variable in the code that you can only see if you view the jupyter notebook code in RAW. However, the name of the file can appear to be different in reality.

I had a notebook "Original.ipynb" in my GitHub repo. I opened this in Google Colab. "Save a copy to GitHub". I changed the name to "Different_Copy.ipynb". I checked the box "Include a link to Colaboratory" as well for a test.

When I try to open "Different_Copy.ipynb" in Colab after that it opens "Original.ipynb" the "Save a copy to GitHub" seems to not change this name variable.

For example this notebook in GitHub appears to be called "Different_Copy.ipynb" but when viewed in RAW you can see the "name": "Original.ipynb".

"colab": {
  "name": "Original.ipynb",
  "provenance": [],
  "include_colab_link": true
},

It seems that when you open "Different_Copy.ipynb" in Colab it opens "Original.ipynb" instead. Also when I click the link at the top generated from "Include a link to Colaboratory".

This means you have to manually change the name variable in the notebook code to view it in Colab if it has been copied from another notebook through "Save a copy to GitHub"

It will open the original notebook not the one you want to open. Note that this "name": "Original.ipynb" is not the same as the name of the notebook. It is an attribute from the code that Colab adds to your jupyter notebook. As you can see here:

"colab": {
  "name": "Original.ipynb",
  ....
},

Also when you rename the notebook it doesn't change this "name" either.

I hope this can be fixed as it very tedious to copy notebook for Colab and prevents access.

cperry-goog commented 3 years ago

Bug in our Github support.

DimaUd commented 2 years ago

Hello, maybe someone can help Litz I'm trying to save colab notebook in github publice repositiry and I get an error message, when I download one line everything is fine when I add then a message will appear again. I did not see that there is a limit on the number of rows, I would be happy to help https://github.com/DimaUd/Heart-Attack/blob/main/Heart

srijita1406 commented 1 year ago

Failed to save notebook to https://github.com/srijita1406/Machine-Learning-Projects/blob/main/Determining_how_different_parameters_affect_income_of_a_person.ipynb CustomError: Failed to save notebook to https://github.com/srijita1406/Machine-Learning-Projects/blob/main/Determining_how_different_parameters_affect_income_of_a_person.ipynb at new iHa (https://ssl.gstatic.com/colaboratory-static/common/a73fc62942aa8cdffebccc1971378afb/external_polymer_binary.js:2083:19) at ta.program_ (https://ssl.gstatic.com/colaboratory-static/common/a73fc62942aa8cdffebccc1971378afb/external_polymer_binary.js:2091:462) at va (https://ssl.gstatic.com/colaboratory-static/common/a73fc62942aa8cdffebccc1971378afb/external_polymer_binary.js:21:57) at ta.throw_ (https://ssl.gstatic.com/colaboratory-static/common/a73fc62942aa8cdffebccc1971378afb/external_polymer_binary.js:20:201) at laa.throw (https://ssl.gstatic.com/colaboratory-static/common/a73fc62942aa8cdffebccc1971378afb/external_polymer_binary.js:22:90) at c (https://ssl.gstatic.com/colaboratory-static/common/a73fc62942aa8cdffebccc1971378afb/external_polymer_binary.js:22:345)

Hi all getting the same error for colab unable to do anything