Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Colab script throws "Transport endpoint is not connected"

I cannot use any bash commands in Google Colab script, it throws me: Transport endpoint is not connected. The problem only occurs in the mounted gdrive (I am using google-drive-ocamlfuse)

For instance, if I type:

>> cd drive/cnn/
[Errno 107] Transport endpoint is not connected: 'drive/cnn/'
>> ls
ls: cannot access '.': Transport endpoint is not connected

I have tried restarting the runtime but no luck.

Has anyone encountered this?

like image 201
Laurynas Tamulevičius Avatar asked Mar 31 '18 13:03

Laurynas Tamulevičius


4 Answers

Silly me, I just simply had to unmount and mount the drive again:

!fusermount -u drive
!google-drive-ocamlfuse drive
like image 184
Laurynas Tamulevičius Avatar answered Oct 20 '22 07:10

Laurynas Tamulevičius


Goto Runtime on menubar and click on restart runtime option.

Or simply use the shortcut press CTRL + M

like image 35
Gihan Gamage Avatar answered Oct 20 '22 08:10

Gihan Gamage


What i did is run this code>

import pandas as pd
from google.colab import drive

drive.mount('/content/gdrive', force_remount=True)

Then I saw my directory because I had to change the path

and it works to me!!

like image 7
EduardoUstarez Avatar answered Oct 20 '22 09:10

EduardoUstarez


Alternatively: Terminate the session by going to : Runtime -> Manage Sessions, then Click on terminate for the session. Then you can re-mount the drive. This will resolve the issue.

like image 6
Jitendra Roy Avatar answered Oct 20 '22 08:10

Jitendra Roy