Project

Profile

Help

Bug #5270

closed

NameError: name 'derivedaaptr' is not defined

Added by O'Neil Delpratt over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Python
Start date:
2022-02-03
Due date:
% Done:

100%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
11.1
Fixed in version:
11.2
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

Description

Reported by user in the following forum posts:

https://saxonica.plan.io/boards/4/topics/8468 and https://saxonica.plan.io/boards/4/topics/8465

The as_list() and array_length() method on the PyXdmArray when called throws the following error:

from saxonc import *

with PySaxonProcessor(license=False) as proc:
    print("Test SaxonC on Python")
    print(proc.version)
    
    list1 = [1,2,3]
    
    print(list1)
    
    xdmValueList1 = [proc.make_integer_value(i) for i in list1]
    
    print(xdmValueList1)
    
    xdmArray1 = proc.make_array(xdmValueList1)
    
    print(isinstance(xdmArray1, PyXdmArray))
    
    list1FromXdmArray = xdmArray1.as_list()

Error:

Traceback (most recent call last):
  File "martin_example2.py", line 20, in <module>
    list1FromXdmArray = xdmArray1.as_list()
  File "saxonc.pyx", line 4495, in saxonc.PyXdmArray.as_list
    count = derivedaaptr.arity()
NameError: name 'derivedaaptr' is not defined

Please register to edit this issue

Also available in: Atom PDF