Question
· Sep 2, 2024

<PROTECT> *Function not allowed in IRIS Native python

Hello Community,

I got the PROTECT error while running functions. But, I could able to call the classmethods and methods in class definition with classMethodObject, classMethodValue etc.. from python. without any errors
python code

irispy.functionString('fnString','IRISPython',14)
irispy.function('fnString','IRISPython',14)
raise RuntimeError(error_message)
RuntimeError: <PROTECT> *Function not allowed
IRISPython.mac
fnString(fn1) public {
  quit "Hello "_fn1
}

$ZV: IRIS for Windows (x86-64) 2024.1 (Build 267.2U) Tue Apr 30 2024 16:41:33 EDT
Discussion (7)2
Log in or sign up to continue

I believe what you're looking at is the new, more fine-grained set of %Native_* resources you need to use native functions. Look for DP-423341 in the upgrade guide. It seems we failed to describe this requirement in the  Native API documentation (or at least I didn't find it where I expected it), so we'll get that addressed.

I'd also recommend defaulting to the new, dynamic upgrade guide that makes it easier to filter on particular types of issues. This is now replacing the old, static pages that were more reliant on / vulnerable to manual curation. In fact you'll no longer find those static pages from the menu in the 2025.1 doc.