Announcement

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

  • import spss command not recognized in Stata 17 on mac

    Hi:

    I am trying to import a dataset that I have only in .sav format. I am on a MacBook Pro Intel where my Stata 17 shows the "import SPSS data" option. So I tried using that interface as well as using the command "import spss using.." but I get the 'command unrecognized' error. Intriguingly, even when I type "import spss ..", the error message says "command import_spss is unrecognized". I am unable to understand why Stata would read "import spss" as "import_spss", which could be why the command is unrecognized.

    Code:
    import spss using "/Users/bala/Projects/21_DELHI_CONJOINT/21_data/21_05_raw/Delhi+Conjoint_April+2,+2024_11.06.sav"
    command import_spss is unrecognized
    Grateful for any help identifying where I am going wrong.

    Bala


  • #2
    Two things come to mind. One is your Stata install might be corrupted and needs to be reinstalled. If this doesn't work, I'd contact Technical Support. The other is your copy of Stata is pirated, and weird things happen with pirated software.

    Comment


    • #3
      Try changing the file name. + and , may be the problem. what a mess.

      Comment


      • #4
        I don't think Stata is reading import spss as import_spss. The import command is operationalised as an ado file, which in turn calls other ado files depending on the type of import that needs to be done. In this case, it calls import_spss.ado.

        Your error suggests to me that your copy of Stata is able to find the import.ado file, but that file is unable to find import_spss.ado.

        Both should be located within your BASE folder. For instance, on my machine I get:

        Code:
        . which import
        /Applications/Stata/ado/base/i/import.ado
        *! version 1.1.2  27sep2018
        
        . which import_spss
        /Applications/Stata/ado/base/i/import_spss.ado
        *! version 1.0.4  01sep2019
        You might want to check your BASE folder to see if the latter file is missing or renamed for some reason. If it is, you need to obtain the relevant files (import_spss.ado and import_spss.sthlp) and put them there.

        Comment


        • #5
          Originally posted by Leonardo Guizzetti View Post
          Two things come to mind. One is your Stata install might be corrupted and needs to be reinstalled. If this doesn't work, I'd contact Technical Support. The other is your copy of Stata is pirated, and weird things happen with pirated software.
          Thank you. I don't have any pirated anything on any of my devices. On whether Stata install could be corrupted, it has been working fine for the couple of years since I upgraded to 17. Even now only 'import spss' is not working. I will explore the suggestions from others.

          Comment


          • #6
            Originally posted by George Ford View Post
            Try changing the file name. + and , may be the problem. what a mess.
            The file name was auto generated when the data was exported from Qualtrics. I tried changing the name removing all the special characters, but the problem persists. Thank you for the suggestion and time.

            Comment


            • #7
              Originally posted by Hemanshu Kumar View Post
              I don't think Stata is reading import spss as import_spss. The import command is operationalised as an ado file, which in turn calls other ado files depending on the type of import that needs to be done. In this case, it calls import_spss.ado.

              Your error suggests to me that your copy of Stata is able to find the import.ado file, but that file is unable to find import_spss.ado.

              Both should be located within your BASE folder. For instance, on my machine I get:

              Code:
              . which import
              /Applications/Stata/ado/base/i/import.ado
              *! version 1.1.2 27sep2018
              
              . which import_spss
              /Applications/Stata/ado/base/i/import_spss.ado
              *! version 1.0.4 01sep2019
              You might want to check your BASE folder to see if the latter file is missing or renamed for some reason. If it is, you need to obtain the relevant files (import_spss.ado and import_spss.sthlp) and put them there.
              Wow! That's spot on. import_spss.ado is indeed missing whereasimport_excel.ado, import_delimited.ado and import_sas.ado are there. Could you point me to where I can source the relevant files from?

              Thank you.

              Comment


              • #8
                Your license information should allow a fresh download reinstalling Stata. Contact StataCorp technical support if that seems difficult.

                Comment


                • #9
                  As context: import spss was added in Stata 16.

                  Comment


                  • #10
                    Originally posted by Nick Cox View Post
                    Your license information should allow a fresh download reinstalling Stata. Contact StataCorp technical support if that seems difficult.
                    Thank you, Nick. I suppose that is the best route in this case.

                    Comment


                    • #11
                      Originally posted by Nick Cox View Post
                      As context: import spss was added in Stata 16.
                      Yes, I read that in the documentation. Moreover, I could see the import spss option in the interface. Thank you.

                      Comment


                      • #12
                        Originally posted by Baladevan Rangaraju View Post

                        Thank you. I don't have any pirated anything on any of my devices. On whether Stata install could be corrupted, it has been working fine for the couple of years since I upgraded to 17. Even now only 'import spss' is not working. I will explore the suggestions from others.
                        Data corruption can happen any time. You can still consider a fresh installation as Nick and I have now suggested. The fact is at least one of the ado files included with your installation is missing.

                        Comment


                        • #13
                          Tech support helped. I just had to re-run the installer and that solved the problem. Thank you, everyone.

                          Comment

                          Working...
                          X