Announcement

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

  • Error: dta file corrupt. There was an I/O error. This suggests the problem is with the device rather than the file itself.

    Hi,

    I sometimes get the above error when opening a dataset. It is not very common, though common enough to interrupt workflow. It happens on different datasets, but not in a reproducible way - it will work if I simply run the .do file again.

    Googling the error gets no hits. I would be grateful for any pointers.

    If relevant, I am running version 16.1 with all updates installed on Windows 10.

    Thanks
    Tom

  • #2
    You might try typing the file -- the opening lines are sometimes informative -- or using hexdump -- or looking at it in a good text editor. Occasionally I find that a .dta file is something else, say a graph file or data in text form.

    You don't say where the data files come from, which could be relevant.

    Comment


    • #3
      Thanks Nick. I am not exactly sure how to interpret the results of hexdump, but the start of the 'character representation' column says:

      Code:
      <stata_dta><header><release>118</release><byteorder>LSF</byteorder><K>..</K><N>�.�.....</N><label>..</label><timestamp>. 5 Jun 2020 09:22</timestamp></header><map>
      The files are created by other .do files I have run. Basically there are some raw .csv files which are read into Stata, which then manipulates them and saves as .dta files. It is these .dtas that I can't read in. Is the fact that each file usually opens fine, and only occasionally errors, relevant?

      Thanks

      Comment


      • #4
        It could be. This is where you need StataCorp technical support. They might well have lots and lots of questions about your Stata, your set-up and your code.

        Comment


        • #5
          Great - thanks Nick, will give them a go.

          Comment

          Working...
          X