question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mounted google drive stop showing *.csv files after run pandas read_csv function once.

See original GitHub issue
  • Describe the current behavior: This just happened this morning 8:42 Pacific time, I first mount the google drive, and using pandas to read a few CSV files from a shared folder. They are large files, after running the first one, the mounted drive stopped showing any CSV files.
  • Describe the expected behavior: Yesterday I run the code, there’s nothing wrong.
  • Browser using are: Chrome, Edge (I don’t think it’s browser related)
  • Here is the problem, you can see from the below replication, the code read one csv, then when it read the second one, it stop working, I double check the folder using ls, all the csv files are gone.
Enter your authorization code:
··········
Mounted at /content/drive
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-1-d5e364018267> in <module>()
      6 from sklearn.preprocessing import MinMaxScaler
      7 data_flt = pd.read_csv('/content/drive/Shared drives/Fake_path/data_flt.csv', dtype='float32')
----> 8 data_int = pd.read_csv('/content/drive/Shared drives/Fake_path/data_int.csv', dtype='int32')
      9 uniprot  = pd.read_csv('/content/drive/Shared drives/Fake_path/final_uniprot.csv')
     10 

4 frames
/usr/local/lib/python3.6/dist-packages/pandas/io/parsers.py in __init__(self, src, **kwds)
   1889         kwds["usecols"] = self.usecols
   1890 
-> 1891         self._reader = parsers.TextReader(src, **kwds)
   1892         self.unnamed_cols = self._reader.unnamed_cols
   1893 

pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.__cinit__()

pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()

FileNotFoundError: [Errno 2] File /content/drive/Shared drives/Fake_path/data_int.csv does not exist: '/content/drive/Shared drives/Fake_path/data_int.csv'

Does anyone have the same problem

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ValentinMoulletcommented, Sep 2, 2020

I think this is the same issue as #1494.

0reactions
billchenJTcommented, Sep 15, 2020

@ValentinMoullet this is not same issue. The #1494 doesn’t show certain file. This one is the file will not present AFTER run function on them, aka reading files will trigger a disappearing. Please make sure you are personally have the experience of #1494 or #1529, then comment. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pandas: How to read CSV file from google drive public?
import pandas as pd url='https://drive.google.com/file/d/ ... from Google Drive using uc?id= , and then pass it to the read_csv function.
Read more >
Python: Read CSV from mounted Google Drive - YouTube
Data: https://www.kaggle.com/mirichoi0218/insuranceThis playlist (or related videos) is included in my online book: ...
Read more >
IO tools (text, CSV, HDF5, …) — pandas 1.5.2 documentation
The workhorse function for reading text files (a.k.a. flat files) is read_csv() . See the cookbook for some advanced strategies.
Read more >
Pandas DataFrame: Playing with CSV files
Persisting the DataFrame into a CSV file. Once we have the DataFrame, we can persist it in a CSV file on the local...
Read more >
How to import a CSV file into Google Colab - Quora
Click on the dataset in your repository, then click on View Raw. Copy the link to the raw dataset and store it as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found