Announcement

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

  • How to deal with the "(texdoc do not running; nothing to do)" error in case of HTML Tables

    Hi Guys,

    Hereby I would like to ask a question regarding the (texdoc do not running; nothing to do) error. I'm fairly new to Stata, so this might be a beginner question.

    I'm trying to built an HTML table based on the article "A Step-by-Step Procedure to Implement Discrete Choice Experiments in Qualtrics" by Sylvain Weber (2019).
    Within this process Weber stated that I should initialize a text document, using the following code:

    texdoc init DCE_${lg}.txt, replace
    tex [[AdvancedFormat]]

    Although I only changed the name of the txt document, Stata keeps repeating the error (texdoc do not running; nothing to do).
    Since I did install the texdoc using "ssc install texdoc", I'm not sure why this error is popping up.

    Does anybody know what I'm doing wrong and how to fix this?

    Thanks in advance!

    PS: I included the do file which comes with the article, so you guys are able to read the whole code

    Attached Files

  • #2
    Hi Michael,

    I ran into the same problem as you when using the code from the article "A Step-by-Step Procedure to Implement Discrete Choice Experiments in Qualtrics" by Sylvain Weber (2019). I found a solution to this problem.

    You need to cut and paste all the code starting from the comment *Initialize txt document" into another do file,

    *Initialize txt document
    texdoc init DCE_EN.txt, replace
    tex [[AdvancedFormat]]

    Then, save the do file as myexample1.do in the save folder and run

    texdoc do myexample1.do

    I attached the modified codes that work for me.
    Attached Files

    Comment


    • #3
      Dear Michael, Dear Ruoding,

      That's quite a late answer but maybe still useful.
      You did not say exactly what you did to end up with that problem, but I guess you have tried to type "do ExpDesign_to_Qualtrics", which is wrong. In order to process a do-file containing texdoc commands, you need to type "texdoc do ExpDesign_to_Qualtrics".
      (I don't see why splitting the do-file in two pieces as Ruoding suggested should help.)

      Best,

      Sylvain

      Comment


      • #4
        Dear Sylvain, Dear Ruoding,

        I had the same problem as Michael. The error I received despite all my best troubleshooting was "texdoc not initialized" for the initialization code. Then, all code that required texdoc after that received the error "texdoc do not running". This is with set trace on. When I ran Sylvain's code according to his instructions everything worked flawlessly as required. For some reason, when I split the code into two .do files (with the second one containing all the texdoc commands), Stata was able to execute the code and produce the .txt file I required. I agree with Sylvain that this should make no difference, but it did.

        Kind regards,
        Jennifer

        Comment


        • #5
          Dear Jennifer,

          That still sounds very strange to me. Could you please be very precise and let me know exactly which dofiles you use and which commands you type?
          Personally, I obtain the same type of error ("texdoc do not running") when I type
          Code:
          do ExpDesign_to_Qualtrics
          EN
          This is because there are texdoc commands within the dofile. To correctly run this dofile, you need to type
          Code:
          texdoc do ExpDesign_to_Qualtrics
          EN
          With the alternative proposed by Ruoding, the line "texdoc do myexample1" is enclosed in ExpDesign_to_Qualtrics.do, which is probably why you don't see any error in that case.

          Please let me know.

          Best regards,

          Sylvain

          Comment


          • #6
            Hello Everyone,

            I am also using the code to create a TXT file developed by Sylvain Weber (2019). I am running into a problem. In that part of the code where we transform all variables from numeric to string, stata keeps saying "value label farelab not found". Until this, everything is working fine. I am not getting why this is happening. If I ignore this and continue, I can create a txt file. But, I am worried if that txt file is correct. Below is the part of the code where it's giving me that error message.

            *Transform all variables from numeric to string.
            *Makes it easier to include the elements in HTML
            *table to be constructed below.
            forv i = 1/2 {
            forv j = 1/5 {
            decode A`i'_`j', gen(tmp)
            drop A`i'_`j'
            ren tmp A`i'_`j'
            }
            }



            Your help is much appreciated.

            Thanks

            Comment


            • #7
              Hi everyone,

              I second all these problems. However when I split the .do files into two exactly like Ruoding and Jennifer suggested, I am still getting the same type of error ("texdoc do not running"). Sylvain please may you advise?

              Thank you very much for your assistance.

              Best wishes,
              William

              Comment


              • #8
                Hi everyone, I have now fixed the issue having directly emailed Sylvain Weber. I believe we had all been misinterpreting what he had said, as I had previously thought he was referring to texdoc do within the .do file like Ruoding had done, but I now understand what he meant was to type texdoc do as opposed to clicking run on the .do file. It is also not necessary to divide the file in two like Ruoding and Jennifer did.

                ---

                Full tips from Sylvain Weber for anyone who needs them:

                As far as I can say, you encounter this issue because you are either trying to run the dofile by typing “do ExpDesign_to_Qualtrics”, or typing interactively each line one after the other. Both ways won’t work because there are texdoc commands in the dofile. Therefore, the dofile must be run by typing “texdoc do ExpDesign_to_Qualtrics” (see “help texdoc” for more details). I have already given this answer in the thread you mention (https://www.statalist.org/forums/forum/general-stata-discussion/general/1546978-how-to-deal-with-the-texdoc-do-not-running-nothing-to-do-error-in-case-of-html-tables?p=1643647#post1643647) but for some reason people seem to keep ignoring it.

                So please do that:
                1. Save the two attached files in a folder “Test ED”
                2. Open the dofile using Stata (or open Stata and change the directory to that folder by typing something like “cd C:/Users/.../Test ED”)
                3. Type “texdoc do ExpDesign_to_Qualtrics”
                4. When prompted “Language (EN/FR):”, type “EN”
                That’s it.

                Comment

                Working...
                X