bash Google Colab 脚本抛出“传输端点未连接”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/49588113/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Google Colab script throws "Transport endpoint is not connected"
提问by Laurynas Tamulevi?ius
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
)
我无法在Google Colab
脚本中使用任何 bash 命令,它抛出我:Transport endpoint is not connected.
问题仅出现在安装的 gdrive 中(我正在使用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?
有没有人遇到过这个?
采纳答案by Laurynas Tamulevi?ius
Silly me, I just simply had to unmount and mount the drive again:
愚蠢的我,我只需要卸载并再次安装驱动器:
!fusermount -u drive
!google-drive-ocamlfuse drive
回答by Jitendra Roy
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.
或者:通过以下方式终止会话:运行时 -> 管理会话,然后单击会话的终止。然后您可以重新安装驱动器。这将解决问题。
回答by Sharaiz Khanzada
try factory reset runtime hope it work
尝试恢复出厂设置运行时希望它工作
回答by EduardoUstarez
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!!
它对我有用!!