Written by

Senior Software Engineer
Question Ashok Kumar T · 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

Comments

Eduard Lebedyuk · Apr 14

Starting from 2024.1 IRIS Native disallows routine invocations. Please use class methods instead. 

For reference, these changes can be identified as DP-422635 and DP-424156.

0
Ashok Kumar T  Apr 15 to Eduard Lebedyuk

Thank you @Eduard.Lebedyuk. Could you please paste the link of DP-422635 and DP-424156.that would be helpful.

0
Dmitry Maslennikov  Apr 15 to Eduard Lebedyuk

And what was the reason for it?

Routnes now deprecated in IRIS?

0
Benjamin De Boe · Apr 16

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.

0