Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Importing .dta files directly from Google Drive

    Hi everyone,

    I have stored my .dta files in my Google Drive and I was using the following code to directly import the data in Stata.

    HTML Code:
    use "https://drive.usercontent.google.com/download?id=1umALdIEDawr5FHrK_CJYjnwun-x9kfth&export=download&authuser=2&confirm=t&uuid=e fa36462-1288-4f50-96a8-4394f6a2ecbc&at=APZUnTUt4uI69v1teqtXQ38FHgjf:17040 85772688", clear
    The link is the download link of the .dta file.

    It was working well until yesterday but I don't know what happened with Stata or Google Drive that this is not working anymore and displaying the following error:

    HTML Code:
    . do "C:\Users\KIDS\AppData\Local\Temp\STD1504_000000.tmp"
    
    . use "https://drive.usercontent.google.com/download?id=1umALdIEDawr5FHrK_CJYjnwun-x9kfth&export=download&authuser=2&confirm=t&uuid=efa36462-1288-4f50-96a8-4394f6a2ecbc&at=APZUnTUt4uI69v1teqtXQ38FHgjf:1704085772688", clear
    file https://drive.usercontent.google.com/download?id=1umALdIEDawr5FHrK_CJYjnwun-x9kfth&export=download&authuser=2&confirm=t&uuid=efa36462-1288-4f50-96a8-4394f6a2ecbc&at=APZUnTUt4uI69v1teqtXQ38FHgjf:1704085772688.dta not Stata format
    r(610);
    
    end of do-file
    
    r(610);

    It is important because I was using above 100 files to import the microdata. If anyone can suggest an alternate, I shall be very thankful!

    Sincerely
    Saqib


    Nick Cox Carlo Lazzaro @Clyde Schechter
    Last edited by saqib hussain; 13 Feb 2024, 11:03.

  • #2
    Its not you nor the code, its google drive
    The message it gives you when using the link you have in the first block is this:

    Sorry, you can&#39;t view or download this file at this time.</p><p class="uc-error-subcaption">Too many users have viewed or downloaded this file recently. Please try accessing the file again later. If the file you are trying to access is particularly large or is shared with many people, it may take up to 24 hours to be able to view or download the file. If you still can't access a file after 24 hours, contact your domain administrator

    Comment


    • #3
      Thank you very much for your response.

      The file is accessible and downloadable, for example, if I directly go to the link, it downloads the file correctly. But if I use this link in Stata, it not working (However, it was working well yesterday).


      HTML Code:
        https://drive.usercontent.google.com/download?id=1umALdIEDawr5FHrK_CJYjnwun-x9kfth&export=download&authuser=2&confirm=t&uuid=e fa36462-1288-4f50-96a8-4394f6a2ecbc&at=APZUnTUt4uI69v1teqtXQ38FHgjf:17040 85772688

      I also tried new files but it's not working. I think there might be an update with Google Drive or Stata that restricts using this option!

      Thank you
      Last edited by saqib hussain; 13 Feb 2024, 11:35.

      Comment


      • #4
        Actually, i just tried your code, and works without any issues.
        I still think it has to do with restrictions regarding multiple access, Thus not Stata, but GoogleDrive

        Comment

        Working...
        X