SPSS Statistics

 View Only
Expand all | Collapse all

SCRIPT command does not always honor CD

  • 1.  SCRIPT command does not always honor CD

    Posted Tue November 09, 2021 06:42 AM
    Edited by System Fri January 20, 2023 04:35 PM
    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
    ------------------------------
    #SPSSStatistics


  • 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
    ------------------------------



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

    Posted Thu June 09, 2022 05:46 AM
    Hi Rick,

    the fix works fine with SPSS 27. It seems this bug was not solved in version 28 but the fix designed for version 27 also works. There's still a little issue. Replacing the original spsswctl.dll with the version 27 fix raises #9021 warning:

    ​>Warning # 9021
    >The version of the SPSS Statistics Manager does not match the version of the
    >SPSS Statistics Processor. There may be problems regarding communication
    >between the two. Use "SHOW VERSION" to determine the two version numbers.

    Is a fix for version 28 planned? Is this problem finally solved in version 29?

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



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

    Posted Thu June 09, 2022 11:34 AM
    Hi, Konrad. You can't mix and match libraries across versions without getting the kind of warning you saw. You would need a fix specifically for the v28 code base.

    As I said earlier, this issue is definitely fixed in version 29. I just re-tested it. If you need a fix for version 28.0.1, that will require another interim fix. I'll have to check into that. It may not be for awhile because all attention is currently on preparing v29 for release.

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