How can I bypass: AttributeError ( 'reflectedfunction' object has no attribute 'from_iterable' ) ?

Asked by george munteanu

[STRUCTURE]
a).bat - triggers test.py

b) test.py
[CODE]
import itertools
results = [['BB', '650', 'I']]
results = list(itertools.chain.from_iterable(results))
print results

[OUTPUT]
the system will return: AttributeError ( 'reflectedfunction' object has no attribute 'from_iterable' )

Note: If I run it inside python idle there is no error.
Note: I am using sikuli 1.0.1

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eugene S (shragovich) said :
#1

It is unclear from you question what reflectedfunction is?

From the error though you can see that it fail because reflectedfunction object doesn't have a method called from_iterable.

Revision history for this message
RaiMan (raimund-hocke) said :
#2

I guess, that the itertools module is not compatible with the Jython used in 1.0.1 (2.5.4).

try with 1.1.0 or simply try with plain Jython before investing in such special code.

Can you help with this problem?

Provide an answer of your own, or ask george munteanu for more information if necessary.

To post a message you must log in.