Hello.
I recently updated my Macbook pro to OSX 10.9.4 and had to reinstall all the components I use for an Akara / Amara / Akamu web application I deploy for medical information management. In short, when I try to run the amara.xslt.transform method on the following XML source (gutted in order to try to isolate the problem):
I get the traceback at the bottom of the page.
The deployed, production web application does not reproduce this when I try to transform the exact same source document with the same XSLT source (which is attached to this email for reference):
>>> from amara.xslt import transform
>>> transform('<Root/>','xslt/index.xslt')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/amara/xslt/__init__.py", line 521, in transform
return proc.run(inputsource(source), params, result)
File "/Library/Python/2.7/site-packages/amara/xslt/processor.py", line 251, in run
return self._run(document, parameters, result)
File "/Library/Python/2.7/site-packages/amara/xslt/processor.py", line 547, in _run
self.transform.apply_templates(context, [node])
File "/Library/Python/2.7/site-packages/amara/xslt/tree/transform_element.py", line 666, in apply_templates
template.instantiate(context, params)
File "/Library/Python/2.7/site-packages/amara/xslt/tree/template_element.py", line 102, in instantiate
child.instantiate(context)
File "/Library/Python/2.7/site-packages/amara/xslt/tree/literal_element.py", line 67, in instantiate
self.process_children(context)
File "/Library/Python/2.7/site-packages/amara/xslt/tree/literal_element.py", line 67, in instantiate
self.process_children(context)
File "/Library/Python/2.7/site-packages/amara/xslt/tree/literal_element.py", line 67, in instantiate
self.process_children(context)
File "/Library/Python/2.7/site-packages/amara/xslt/tree/literal_element.py", line 67, in instantiate
self.process_children(context)
File "/Library/Python/2.7/site-packages/amara/xslt/tree/if_element.py", line 21, in instantiate
if self._test.evaluate_as_boolean(context):
File "/Library/Python/2.7/site-packages/amara/xpath/expressions/__init__.py", line 72, in evaluate_as_boolean
docstring=unicode(self))
File "/Library/Python/2.7/site-packages/amara/xpath/compiler/__init__.py", line 45, in compile
firstlineno)
File "/Library/Python/2.7/site-packages/amara/xpath/compiler/assembler.py", line 60, in assemble
stacksize = self._compute_stack_size()
File "/Library/Python/2.7/site-packages/amara/xpath/compiler/assembler.py", line 202, in _compute_stack_size
return walk(self.entry, 0, 0)
File "/Library/Python/2.7/site-packages/amara/xpath/compiler/assembler.py", line 192, in walk
maxsize = walk(instr.target, size, maxsize)
File "/Library/Python/2.7/site-packages/amara/xpath/compiler/assembler.py", line 198, in walk
maxsize = walk(block.next, size, maxsize)
File "/Library/Python/2.7/site-packages/amara/xpath/compiler/assembler.py", line 187, in walk
raise RuntimeError("unhandled instruction: %r" % instr)
RuntimeError: unhandled instruction: <instr at 0x1082cd9a8: opname='<block 1, offset 0>', oparg=None, target=None>