Announcement

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

  • Data error (cyclic redundancy check) r(691);

    Hi,

    I have a loop which imports csv file from my harddisk and saves them in .dta format. The data files are quarterly from 1993 onwards.

    For some files pre-2000, such as 1997q2, 1995q2-q4, 1993-1994 the loop shows me r(691) error mentioed in subject line.
    I have not been able to find anything to help me resolve this error.

    Can anyone please direct me to the right resource or talk about potential reasons for this error? Thank you.

  • #2
    When you get an error message you don't understand, the error code, r(691), is shown in blue because it is a link to an explanation. If you click on that link, you will find:

    [P] error . . . . . . . . . . . . . . . . . . . . . . . . Return code 691
    I/O error;
    A filesystem error occurred during input or output. This
    typically indicates a hardware or operating system failure,
    although it is possible that the disk was merely full and
    this state was misinterpreted as an I/O error.
    I should add that I have sometimes seen this error occur when running code that is very input/output intensive. Sometimes Stata asks the operating system to write files faster than the operating system can keep up. When the operating system's buffers are full, you will get an error (though I'm not sure you will necessarily get this one.) Anyway, if you cannot identify a problem with your hardware or OS, try putting some -sleep 500- commands right before all of your -save- commands. That will slow Stata down by making it pause 500 milliseconds before asking the OS to write another file. That gives the OS some time to get caught up.
    Last edited by Clyde Schechter; 28 Mar 2017, 22:37.

    Comment


    • #3
      Hi Clyde,
      I have -sleep 500- breakers in my code already, and still have more than 200 GB hard disk space left (though I am using -tempfile- to save even more space).
      Also, I was able to import almost 150 files using the loop - so I guess my harddisk is working.

      By looking at the specific line in the code that generate this error, I know it is happening when I try to import certain file. Even when I manually import the file (outside the loop), I still get the error.
      I have tried downloading the file again (in case it was corrupted) but that does not resolve the error. Please note that all file sizes are pretty much the same.

      Do you have any more suggestions? Thanks.

      Comment


      • #4
        I would try appending the problematic file to another file that imports without any issue in a different software (say excel) as a workaround.

        Comment

        Working...
        X