SPSS Statistics

 View Only
  • 1.  SCRIPT command does not always honor CD

    Posted Tue November 09, 2021 06:42 AM
    Edited by Konrad Gałuszko Tue November 09, 2021 06:49 AM
    I would like to run a Python 3 script using SCRIPT command. However, the problem is that SPSS randomly honors a path defined earlier by CD command. Of course the script is in the same place as the path defined by CD. Code:
    *** Setting a path.
    cd "C:\Survey Folder\Results".

    *** This works.
    script "C:\Survey Folder\Results\py3script.py".

    *** These almost always don't.
    script "py3script.py".
    script pythonversion = 3 "py3script.py".
    I remember this problem has occured since version 25 but up to 26 it sometimes worked with CD. In version 27 I cannot get desired result. Is it a bug or documentation simply doesn't mention that a path for a script needs to be given explicitly? If it is a bug - is it fixed in version 28?

    ------------------------------
    Konrad Gałuszko
    ------------------------------


  • 2.  RE: SCRIPT command does not always honor CD

    Posted Mon December 06, 2021 09:42 AM
    Hi, Konrad. Sorry I missed this post. It looks like a bug to me; I am in communication with the development team and will see that the issue is addressed.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 3.  RE: SCRIPT command does not always honor CD

    Posted Tue January 11, 2022 06:42 AM
    Hi, @Rick Marcantonio. Do you have any update?​

    ------------------------------
    Konrad Gałuszko
    ------------------------------



  • 4.  RE: SCRIPT command does not always honor CD

    Posted Tue January 11, 2022 10:21 AM
    Hi, Konrad. This has been fixed; I am checking now to see if the fix made it into version 28.0.1 or only into the next release (29). What version are you currently running?

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 5.  RE: SCRIPT command does not always honor CD

    Posted Wed January 12, 2022 06:38 AM

    Hi Rick. I'm using 27.0.1.0.






  • 6.  RE: SCRIPT command does not always honor CD

    Posted Wed January 12, 2022 10:01 AM
    OK. I'll look into the possibility of an interim fix for that release. Can't promise, but I'll ask...

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 7.  RE: SCRIPT command does not always honor CD
    Best Answer

    Posted Thu January 27, 2022 09:58 AM
    The fix for v27.0.1 is here.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 8.  RE: SCRIPT command does not always honor CD

    Posted Mon February 14, 2022 06:31 AM
    Hello,

    thanks for the fix!. One important note: it may not work after first run. When I replaced spsswctl.dll and ran SPSS 27 it didn't work. However, after further launches it started working.

    ------------------------------
    Konrad Gałuszko
    ------------------------------