Author Topic: i have inherited pyxll module written for pyxll 2.01, erroring pyxll 2.2  (Read 692 times)

cm

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
i have inherited pyxll module written for pyxll 2.01, erroring pyxll 2.2
error is "Error converting args for <function> Unexpected NULL FP/FP12 pointer"

has anything changed with regard to handling functions args?

The code still works when executed in pyxll 2.01 but we need to migrate to 2.2
thanks

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 610
  • Karma: +14/-1
    • View Profile
Hi,

this error catches a case where Excel doesn't handle certain sets of arguments correctly. This has been known to happen in the 64 bit version of Excel 2010. Are you also changing the version of Excel as well as the version of PyXLL?

What is the signature of your function? I suspect a workaround may be to change "float[]" to "var".

Best regards,
Tony

cm

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
the function signature looks like this:

@xl_func("float[] a, float[] b, float c, float d, float e, float[] f, float[] g, float[] h, float[] i, float[] rho, float[] r, float[] T, string direction: float[]", category="stuff", volatile=True)

i tried replacing the float[] with var, still blows up with the same error. I am using Excel 2013 64bit. Previous this code was running on Excel 2010 32bit.

Are there any other things to try? many thanks!

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 610
  • Karma: +14/-1
    • View Profile
Hi,

which float[] did you replace? Try replacing the return type with var, ie

@xl_func("float[] a, float[] b, float c, float d, float e, float[] f, float[] g, float[] h, float[] i, float[] rho, float[] r, float[] T, string direction: var", category="stuff", volatile=True)

Best regards,
Tony

cm

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
aha, just changing the return type seems to fix the issue. I've left all the preceding floats in-place so now i just have:

@xl_func("float[] a, float[] b, float c, float d, float e, float[] f, float[] g, float[] h, float[] i, float[] rho, float[] r, float[] T, string direction: var", category="stuff", volatile=True)

seems to do the job.
thanks!

Tony

  • Administrator
  • Hero Member
  • *****
  • Posts: 610
  • Karma: +14/-1
    • View Profile
Great! That's still an open issue with the x64 version so it will be fixed in a future version. I'll add your function signature to the issue as another example for testing.

thanks,
Tony