Getting Help

I usually search Google for help with problems I run into while coding, but sometimes that doesn’t work. Usually that’s because I find it hard to frame a question that gives relevant results. Then, as a last resort, there’s StackOverflow. My history with them has been rather chequered. I was chided for asking one question (no idea why) and banned for a week. On another question I got a very helpful answer from one user just before a moderator stepped in and said the kind of question I had asked was not permitted. Luckily I already had an answer. What will happen this time?

Problem is I opened a Jupyter Notebook directly from Yves Hilpisch’s GitHub repo in Google Colab. Two cells in the notebook attempt to open another file, one to run a .py file, and the other to load a .csv file. Both cells gave ‘file not found’ error even though the files exist in the correct places. Since nearly every Jupyter Notebook under the sun loads a csv file at least, what is the point of Google Colab providing the option to open a notebook directly from a GitHub repo if it can’t load such a file? I’m clearly missing something.

Of course there’s a workaround. I can download the repo to my local machine and then upload it to my Google Drive. In fact I seem to remember that it’s possible to transfer a GitHub repo directly to Google Drive without the download. Then run the notebook from Drive, and that should have no problem accessing the data files. But still, what is the point of suggesting it’s even possible to run a notebook directly from GitHub? Just a source of frustration. As if I don’t have enough of that in my life.

AFTERTHOUGHT

As a former teacher of programming, it has occurred to me that Google Colab/GitHub is an ideal combination for teaching. A teacher could upload example code to GitHub, students could open the files from Google Colab, all without the students or the institution having to concern themselves with installation and maintenance of a Python environment. Also maybe data files could be accessed via http request rather than from a drive. I must check that (the http request) out as it would answer my basic question of how would this be generally useful.