Skip to content

Iteration on std.vector['char'] is broken #9632

@eguiraud

Description

@eguiraud
  • Checked for duplicates

First reported as a problem in RDataFrame.AsNumpy on the forum.

The following code:

#!/usr/bin/env python3
import ROOT

vec = ROOT.std.vector['char'](['a','b','c'])
for _ in vec:
    pass

produces:

TypeError: function takes exactly 5 arguments (1 given)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/blue/Scratchpad/work/forum-pyroot-error/reproducer.py", line 5, in <module>
    for _ in vec:
SystemError: <cppyy.CPPOverload object at 0x7f0b0348c1c0> returned a result with an exception set

Notably, sometimes it seems to run without errors.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions