sat28 / githubcommit

A jupyter notebook extension enabling users push ipython notebooks to a git repo
MIT License
128 stars 75 forks source link

more precision #5

Open mxardre opened 6 years ago

mxardre commented 6 years ago

Hi, I do not know if I write in the good location. But I have a question. The instruction to finish the git version control on a file are not clear to me :/. Can you help us through this? Where the file is I did a : git init git add file.ipynb git commit -m 'initial project using fluomean as the signal'

This is what should be done right? But when I click on the git button to push in jupyter notebook a got insulted with: Uncaught exception PUT /git/commit (::1) HTTPServerRequest(protocol='http', host='localhost:8888', method='PUT', uri='/git/commit', version='HTTP/1.1', remote_ip='::1', headers={'Accept': 'application/json, text/javascript, */*; q=0.01', 'X-Requested-With': 'XMLHttpRequest', 'Content-Length': '68', 'Accept-Language': 'fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Host': 'localhost:8888', 'Dnt': '1', 'Accept-Encoding': 'gzip, deflate', 'Referer': 'http://localhost:8888/notebooks/cleanPipeline2018-01-05.ipynb', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:59.0) Gecko/20100101 Firefox/59.0'}) Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/tornado/web.py", line 1467, in _execute result = method(*self.path_args, **self.path_kwargs) File "/usr/local/lib/python3.5/site-packages/githubcommit/handlers.py", line 21, in put git_dir = "{}/{}".format(os.path.expandvars(os.environ.get('GIT_PARENT_DIR')), os.path.expandvars(os.environ.get('GIT_REPO_NAME'))) File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/posixpath.py", line 281, in expandvars if '$' not in path: TypeError: argument of type 'NoneType' is not iterable [E 17:13:35.608 NotebookApp] { "Accept": "application/json, text/javascript, */*; q=0.01", "X-Requested-With": "XMLHttpRequest", "Content-Length": "68", "Accept-Language": "fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3", "Connection": "keep-alive", "Content-Type": "application/json", "Host": "localhost:8888", "Dnt": "1", "Accept-Encoding": "gzip, deflate", "Referer": "http://localhost:8888/notebooks/cleanPipeline2018-01-05.ipynb", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:59.0) Gecko/20100101 Firefox/59.0" } [E 17:13:35.608 NotebookApp] 500 PUT /git/commit (::1) 4.41ms referer=http://localhost:8888/notebooks/cleanPipeline2018-01-05.ipynb

I also strongly advice to install the githubcommit package from inside the jupyter with : the snippet: import sys !{sys.executable} -m pip install requests !{sys.executable} -m pip install git+https://github.com/sat28/githubcommit.git

Cheers

sat28 commented 4 years ago

@mxardre pls look into this if it helps - https://www.youtube.com/watch?v=vKx_4zFvOi8