我想使用以下代码从Google Colab下载数据集:
from google.colab import files
drive.mount('drive')
df.to_csv('df.csv')
files.download('df.csv')
它返回了
MessageError Traceback (most recent call last)
<ipython-input-33-c43df340357d> in <module>()
2 drive.mount('drive')
3 df.to_csv('df.csv')
----> 4 files.download('df.csv')
2 frames
/usr/local/lib/python3.6/dist-packages/google/colab/_message.py in read_reply_from_input(message_id, timeout_sec)
104 reply.get('colab_msg_id') == message_id):
105 if 'error' in reply:
--> 106 raise MessageError(reply['error'])
107 return reply.get('data', None)
108
MessageError: TypeError: Could not connect to the server.
我以前从未遇到过此错误,并且互联网上也没有类似的问题。 任何帮助表示赞赏。