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?
Silly me, I just simply had to unmount and mount the drive again:
!fusermount -u drive
!google-drive-ocamlfuse drive
Goto Runtime on menubar and click on restart runtime option.
Or simply use the shortcut press CTRL + M
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!!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With