Announcement

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

  • Stata 13 corrupting files

    Since last week two of my data files have been corrupted and I have no clue what is going on. I have experienced this problem after updating to stata 13.1.

    Here is the message I get:

    “.dta file corrupt
    The marker </data> was not found in the file where it was expected to be. This means that the file was written
    incorrectly or that the file has subsequently become damaged.”

    I have used this file for almost 1 month and suddenly I get this message. Last time when i worked on Stata everything was fine. I am not sure what is causing this but is very scary. I have already lost two important files to this error and will really appreciate any inputs to this.

  • #2
    What environment? Windows, Mac, Linux? Where and how are the files stored (local hard drive network drive, log into server) and do other people have access to the same files?
    Wild guesses are
    • other people using/saving the same file (if it's a multi-user environment)
    • failing hard drive
    • you have multiple instances of Stata running at the same time accessing the file
    Scary stuff!

    Also: did you remove Stata 12 before installing Stata 13? if you tend to open .dta files by double-clicking, if Stata 12 tries to open a Stata 13 file, then you might get that error. So make a not of whether it happens from just clicking, or if it happens when you call it from a .do file. Hopefully it's that simple.
    Last edited by ben earnhart; 29 Sep 2014, 18:57. Reason: thought about click-on-.dta as a possibility

    Comment


    • #3
      First off, make sure you have good backups of everything.

      There are any number of possible causes. Your hard disk could be failing. You could have a virus. I doubt that Stata itself is the problem, but you could consider re-installing.

      If it was me, I would start by running a virus scan. Then I would run a diagnostic program on my hard disk. If you have Stata on another machine, you could see if it has trouble opening your file.
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      Stata Version: 17.0 MP (2 processor)

      EMAIL: [email protected]
      WWW: https://www3.nd.edu/~rwilliam

      Comment


      • #4
        Haarpret:
        if luck does not support your try with the above sound advices, you can contact Stata Technical Service (plase see http://www.stata.com/support/tech-support/contact/).

        Kind regards,
        Carlo
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Originally posted by Harpreet Singh View Post
          Last time when i worked on Stata everything was fine. I am not sure what is causing this but is very scary.
          From the citation above, there is no reason to blame Stata so categorically as in the thread title.

          The whole question sounds like "my car doesn't work. What might be the reason?" and lacks any actionable clues.

          Probabilistically (from my own completely non-representative experience) the likeliness of loosing data is:

          1) accidental overwrites/human factor, either programming mishaps in my own code, or manual file management (blame myself);
          2) hardware failure ;
          3) Stata's fault.

          My completely biased estimate of the distribution between above is about 95%+5%+0%

          Most posts in this forum get some sort of answer within minutes of being submitted. It's hard to imagine that Stata was loosing data and nobody reported the issue for more than a week.
          Googling the error message reconfirms this is the single mentioning of such an error.

          In any case, there are two tools at your disposal for such troubleshooting:

          1) in Stata 13: dtaverify - will verify the validity of a Stata dataset according to the official specification; it will not tolerate any deviation from specification.

          2) use13 program is available from SSC. It is an independently written tool based on the specification 117 of the dta files. It does tolerate some deviations from the specification observed in practice and is available for Stata 10 and higher. If you suspect any problem with a dataset from Stata 13, give it a try and it might give a secondary opinion/error message.

          They only answer if the file is having any problem, not what is the cause of the program.

          Best, Sergiy Radyakin


          Comment

          Working...
          X