since several days, i can not connect to google drive in google colaboratory.
here is the code, that before always worked:
from google.colab import drive
drive.mount('/content/gdrive/')
I tried the following, after reading several blogs for a solution:
-> I only have two items in my first folder of google drive
-> My trash folder is empty
-> I reset all the sessions
-> I create new file for testing just the piece of code above.
-> I restarted my computer and my browser Chrome
-> I tried "drive.mount('/content/gdrive')" , drive.mount('/content/gdrive/'), drive.mount('/content/'), drive.mount('/content'), drive.mount('/content/gdrive/My Drive')
Any idea? Thanks a lot!
here is the error:
TIMEOUT Traceback (most recent call last)
<ipython-input-2-9a9a89271754> in <module>()
1 from google.colab import drive
----> 2 drive.mount('/content/gdrive/')
4 frames
/usr/local/lib/python3.6/dist-packages/pexpect/expect.py in timeout(self, err)
142 exc = TIMEOUT(msg)
143 exc.__cause__ = None # in Python 3.x we can use "raise exc from None"
--> 144 raise exc
145
146 def errored(self):
TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7f5666fe0a90>
searcher: searcher_re:
0: re.compile('google.colab.drive MOUNTED')
1: re.compile('root@2cd8a6fe3c15-de18aaee18634b4c829aedf956090476: ')
2: re.compile('(Go to this URL in a browser: https://.*)$')
3: re.compile('Drive File Stream encountered a problem and has stopped')
4: re.compile('drive EXITED')
<pexpect.popen_spawn.PopenSpawn object at 0x7f5666fe0a90>
searcher: searcher_re:
0: re.compile('google.colab.drive MOUNTED')
1: re.compile('root@2cd8a6fe3c15-de18aaee18634b4c829aedf956090476: ')
2: re.compile('(Go to this URL in a browser: https://.*)$')
3: re.compile('Drive File Stream encountered a problem and has stopped')
4: re.compile('drive EXITED')
Google Drive operations can time out when the number of files or subfolders in a folder grows too large. If thousands of items are directly contained in the top-level "My Drive" folder then mounting the drive will likely time out.
What is “background execution”? Pro+ users have the additional ability to enable background execution for a limited number of notebooks which will continue execution after you close your browser to a maximum runtime limit of up to 24 hours. You can enable background execution in Notebook settings.
This is being tracked in https://github.com/googlecolab/colabtools/issues/1540.
Workaround is to copy the oauth code using a mouse-drag instead of using the "copy" button.
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