Announcement

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

  • Dropbox STATA Mac "not Stata format" issue

    Hi everyone,

    I use STATA/SE 18 and keep my files and data on Dropbox. Dropbox is also integrated into my hard drives on my work PC (Windows) and my Macbook.

    When I use the Windows PC, it automatically downloads the files I need for the regressions, and Dropbox pops up and gives a notification about it. For example, the following command accesses the file, even though it is initially in an "Online Only" mode:
    Code:
    use "${path_tables}2Sample.dta", clear
    Now, when I do the exact same thing with the exact same file on my Macbook, I get the following error message:
    Code:
    file /Users/Username/Dropbox/harddrive/data/dataset/project-name/2Sample.dta not Stata format r(610);
    .

    My current workaround is double-clicking on the file I need when using the Macbook. The data gets uploaded into the STATA interface, and I can work with it.

    Maybe my problem is even more complicated because even downloading the file to my Mac and then trying to open it with STATA gives me the same error code:
    Code:
    file /Users/Username/Dropbox/harddrive/data/dataset/project-name/2Sample.dta not Stata format r(610);
    . I have to upload it into STATA first, no chance otherwise.

    Any feedback is appreciated, as this hinders double platform workability tremendously.

    Thank you and best wishes,
    Björn.

  • #2
    I don't understand the problem. Are you just saying you wish to import a Stata dataset from the internet into your Stata terminal on your computer?

    Comment


    • #3
      I wish to tell STATA to use a certain file that is stored in the dropbox folder on my macbook. On the Windows PC that is no problem, the file gets downloaded and I can use it in the STATA terminal. On macbook, I generally get shown an error that tells me the dta-file is not STATA format. That problem remains even if I download the respective file before.

      Comment


      • #4
        I found another threat discussing a similar issue. https://www.statalist.org/forums/for...om-dropbox-com

        The only difference for me is that I am okay with downloading the respective files to my macbook. But STATA still doesn't recognize the files. And as I wrote before - on Windows STATA does not only recognize the files, it also automatically downloads them.

        Comment


        • #5
          Bjorn Becker I think this gives some important clues as to what is going on:

          Maybe my problem is even more complicated because even downloading the file to my Mac and then trying to open it with STATA gives me the same error code:
          How are you downloading the .dta file? Do you download the file using the dropbox web interface? If so, which browser do you use? Or do you download the file programmatically with Stata or some other program? Can you please double check the file extension of the downloaded version that does not work by right clicking the file and going to get info, then looking at the full file name under "Name and Extension"? Could you please also confirm that the file is a binary file by right clicking and opening the file in TextEdit (or some other text editor)?

          Comment


          • #6
            Hi Daniel Schaefer.

            I'll try to answer all your questions - before I get to them one new finding: I checked if I can access the dta-file through the "use" command in STATA, as I tried before, if it is outside the dropbox folder. It works without any issue. If I put the same file back into the dropbox folder on my macbook it again does not function. There must be an issue related to the dropbox directory that I do not understand.


            Regarding your questions:


            How are you downloading the .dta file? Do you download the file using the dropbox web interface?

            All the dropbox files can also be seen in my folder structure on my macbook. I download the file by right-clicking and choosing "make it available offline".


            Or do you download the file programmatically with Stata or some other program?

            Currently the problem even exists if I download the file first as described above and try to use it then with STATA.


            Can you please double check the file extension of the downloaded version that does not work by right clicking the file and going to get info, then looking at the full file name under "Name and Extension"?

            The file name is file_name.dta. Under "general information" (I use the German version so it might be called slightly different in English) it says Stata Data File.


            Could you please also confirm that the file is a binary file by right clicking and opening the file in TextEdit (or some other text editor)?

            I can open it in TextEdit and it shows a lot of varying characters. It starts off like this:

            <stata_dta><header><release>118</release><byteorder>LSF</byteorder><K>å</K><N>fl“</N><label></label><timestamp> 8 Aug 2024 11:56</timestamp></header><map>ûR,Û "3 aˇ€√fl5hÊ5qG ÄG v (v </map><variable_types>˘ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ¯ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ ˙ˇ˙ˇ˙ˇ˙ˇ˘ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˘ˇ˙ˇ¯ˇ˙ˇ˘ˇ˙ˇ¯ˇ˙ˇ˘ˇ˙ˇ ¯ˇ˙ˇ˘ˇ˙ˇ¯ˇ˙ˇ˘ˇ˙ˇ¯ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ˙ˇ


            Thank you very much in advance!

            Comment


            • #7
              Okay, that is the right header for a Stata data file.

              Outside of user error (I assume you are absolutely sure the path points to the right place and there are no misspellings), I'm really struggling to come up with a theory as to what's going on here. It seems like when Stata looks for the file on the file system it sees something that looks like your .dta file but isn't. My best (though frankly farfetched) guess is that your dropbox file is actually a symbolic link that Stata doesn't know how to follow. The issue is that Stata shouldn't need to know how to follow a symbolic link because the OS should do that on Stata's behalf. Either there is some kind of deep voodoo going on between Dropbox and whatever it needs to do to serve up-to-date files, the OS API, and Stata, or I am missing something obvious (it happens).

              If you navigate to the dropbox folder in the terminal on your mac and type ls -l you should see the files in your dropbox folder listed. If there is an arrow like this -> and a path after the file name then the file is actually a symbolic link. That might suggest what kind of voodoo is happening, but I have no idea what you might be able to do to fix the issue. If the file is not a symbolic link, I'm afraid I really have no idea. Dropbox uses a very specific operating system API to serve up files when you ask for them. A deeper understanding of that API might point to the underlying cause, but again, probably not towards a solution.

              You could always reach out to Stata tech support.

              Comment


              • #8
                Thank you so much for keeping on this. By now I also deinstalled the entire folder system and reinstalled. No change.

                Sadly, I do not fully understand you advice related to the terminal on my mac.

                Anyways, following your last statement - I now contacted the support - but first of dropbox. By now this feels more like a problem of them than a problem of STATA.

                I guess every user says so initially, but I am pretty sure it's not a user error. I'll get back with updates once I hopefully have a solution if this occurs for anyone else.

                Again, thank you very much!

                Comment

                Working...
                X