Announcement

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

  • Uninformative error message: "__000006 already defined"

    Last summer a colleague and I wrote an ado file to implement a new command in Stata. I've made some small edits to add a command line argument, and now I'm getting the following error:

    __000006 already defined
    r(110);

    OK, so two questions:
    (1) I understand that __000006 is a temporary variable, but I don't know what it is. What can I learn from this error message?
    (2) Is this really the best feedback that I can hope for? Many programming languages have integrated editors that will highlight the line that's causing the problem, or at least not burden the user with uniformative internal codes like __000006 and r(110). I'm not seeing any features like that in Stata's built-in Do-File editor....
    Last edited by paulvonhippel; 12 Jan 2015, 12:35.

  • #2
    It's a temporary variable name; odds that you need replace not generate or that you have identified the wrong variable to change.

    Code:
     
    set trace on
    will show you where the program fails.

    Comment


    • #3
      Hi Paul
      _000006 is most probably a temporary variable in your ado-file.
      Use
      set trace on and set tracedepth 1 (probably if your program does not contain subprograms) before running the command. You will get a trace of the program and will find out which one of the temporary variables is triggering the error message.
      Best regards
      Christophe

      Comment


      • #4
        That helped a lot, thanks! I don't always write Stata ado file, but when I do I'm glad for this list!
        Are there any integrated editors / debuggers available for Stata ado files?

        Comment


        • #5
          No, Stata does not support external debugging of do/ado files.

          There are plenty of alternative syntax highlighters, project managers, etc.
          Alternative debugging is not available.

          Best, Sergiy Radyakin

          Comment


          • #6
            Resurrecting this post to add:

            I have come across this error in a very simple context. I was trying to graph a variable but it turned out the variable was empty aka all missing. As such, the graph tool could not calculate the temporary frequencies that it wanted to graph and was attempting to store in _000006.

            Comment

            Working...
            X