X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 27 Feb 2018 02:09 PM by  Wayne Landsman
OSX High Sierra + IDL 8.5.1: error Keyword parameters not allowed in call.
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Steven Finkelstein



New Member


Posts:1
New Member


--
26 Feb 2018 11:55 AM
    Hello, I recently got a new machine which had OSX 10.13 (High Sierra) preinstalled, and my university installed IDL 8.5.1. I proceeded to try to run some code which has worked fine on other machines running IDL 8.3 and 8.6. I get this error:

    Keyword parameters not allowed in call.

    (it points to the following line, though as I show below, I don't think anything is wrong with this syntax):
    if finite(lnp[i]) then lnp[i]+=call_function(lfunc,x[*,i],_EXTRA=_extra)

    I have traced it to a few different points, but this error occurs even when trying to read in a simple textfile using astrolib's "readcol.pro":

    IDL> readcol,'t.txt',x,y,/silent
    % Keyword parameters not allowed in call.
    % Execution halted at: $MAIN$

    I've searched a bunch and a lot of people have had this problem over the years, but the suggested fixes are not working for me. Does anyone have any ideas? Is this somehow linked to the new Mac OS? Thanks!

    Wayne Landsman



    New Member


    Posts:7
    New Member


    --
    27 Feb 2018 08:51 AM
    It is likely you have an obsolete or modified version of readcol.pro which does not include the SILENT keyword. READCOL is not part of IDL but comes from a separate (Astronomy) library https://idlastro.gsfc.nasa.gov/ftp/pro/misc/readcol.pro I would try downloading this version and see if you still have the problem.

    It is possible that you have another library in your !PATH that includes the obsolete/modified version of READCOL, and this version is taking precedence. You can see all versions of readcol.pro in your !PATH by typing
    IDL> findpro,'readcol'

    (where findpro.pro is also in the Astronomy Library) --Wayne

    Steven Finkelstein



    New Member


    Posts:1
    New Member


    --
    27 Feb 2018 12:32 PM
    Thanks for the reply! But I don't think thats it. I did try replacing with the version you sent, and it did tell me where the problem was, in line 332:

    tst = strnumber(var,val,hex=hex,NAN=nan) ;Valid number?

    I'm still getting the same error: % Keyword parameters not allowed in call.

    And, I don't think this is related to readcol since I get it I think anytime I try to call a function or procedure.

    Wayne Landsman



    New Member


    Posts:7
    New Member


    --
    27 Feb 2018 02:09 PM
    OK. strnumber.pro is another function in the Astronomy library (not a standard part of IDL) which is required by readcol.pro. I'll stick with my same answer as before but for strnumber.pro rather than readcol.pro itself. You have an obsolete/modified version of strnumber.pro in your !path that doesn't accept keywords

    https://idlastro.gsfc.nasa.gov/ftp/pro/misc/strnumber.pro
    You are not authorized to post a reply.