python - Files written by Colab not appearing in finder - Stack Overflow

I have written a function to download certain files to both a local directory and a google drive direct

I have written a function to download certain files to both a local directory and a google drive directory. The files do not appear in Finder, nor via an "ls -la" command in Terminal.
When I run a Terminal Listing within my colab notebook, the files are listed in the expected directory structure:

import os
for root, dirs, files in os.walk("/Users/glenn/Documents/SEC Edgar Data"):
    print("Folder:", root)
    for file in files:
        print("  ", file)

COLAB OUTPUT SAMPLE:

older: /Users/xxxxx/Documents/SEC Edgar Data
   Comerica_10K.html
   test_file.txt

Folder: /Users/xxxxx/Documents/SEC Edgar Data/sec-edgar-filings
Folder: /Users/xxxxx/Documents/SEC Edgar Data/sec-edgar-filings/WTFC
Folder: /Users/xxxxx/Documents/SEC Edgar Data/sec-edgar-filings/WTFC/10-K
Folder: /Users/xxxxx/Documents/SEC Edgar Data/sec-edgar-filings/WTFC/10-K/0001015328-25-000093
   full-submission.txt
Folder: /Users/xxxxx/Documents/SEC Edgar Data/sec-edgar-filings/WTFC/10-K/0000948572-00-000021

I have tried many different debugging options, including looking for hidden files and restarting the finder. Still, no files appear.

Can anybody help me further debug?

I have written a function to download certain files to both a local directory and a google drive directory. The files do not appear in Finder, nor via an "ls -la" command in Terminal.
When I run a Terminal Listing within my colab notebook, the files are listed in the expected directory structure:

import os
for root, dirs, files in os.walk("/Users/glenn/Documents/SEC Edgar Data"):
    print("Folder:", root)
    for file in files:
        print("  ", file)

COLAB OUTPUT SAMPLE:

older: /Users/xxxxx/Documents/SEC Edgar Data
   Comerica_10K.html
   test_file.txt

Folder: /Users/xxxxx/Documents/SEC Edgar Data/sec-edgar-filings
Folder: /Users/xxxxx/Documents/SEC Edgar Data/sec-edgar-filings/WTFC
Folder: /Users/xxxxx/Documents/SEC Edgar Data/sec-edgar-filings/WTFC/10-K
Folder: /Users/xxxxx/Documents/SEC Edgar Data/sec-edgar-filings/WTFC/10-K/0001015328-25-000093
   full-submission.txt
Folder: /Users/xxxxx/Documents/SEC Edgar Data/sec-edgar-filings/WTFC/10-K/0000948572-00-000021

I have tried many different debugging options, including looking for hidden files and restarting the finder. Still, no files appear.

Can anybody help me further debug?

Share Improve this question asked Mar 26 at 18:39 GPBGPB 2,4958 gold badges27 silver badges37 bronze badges 3
  • When you run an os.walk() command in Colab on what appears to be a local path, Colab is actually checking its own filesystem structure, not your local machine's. – Bhargav Commented Mar 26 at 19:02
  • @Bhargav thank you. How do you suggest I reconcile? I've not had a problem writing to my local machine in the past. – GPB Commented Mar 26 at 21:36
  • UPDATE: I can see the files which are located by os.walk within the colab directory structure. This is not mirrored in my local drive. This has never been the case in the past - all writes have always been locally mirrored. Is there a setting which might have changed to prevent the mirroring? – GPB Commented Mar 26 at 21:58
Add a comment  | 

1 Answer 1

Reset to default 0

Update - I had a problem with G-Drive, issue has been resolved. Thank you everyone who considered my post.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744131815a4559877.html

相关推荐

  • python - Files written by Colab not appearing in finder - Stack Overflow

    I have written a function to download certain files to both a local directory and a google drive direct

    8天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信