For loop is not working in IronPython 2.7 with Robot Framework 2.5.7 and Python 27

85 views
Skip to first unread message

SOURABH TIWARI

unread,
Nov 16, 2011, 8:29:18 AM11/16/11
to robotframework-users
Hi,

I have installed IronPython 2.7 and Python 27 when i tried to execute for loop it gave me following error :

Converting argument of FOR IN RANGE failed: ValueError: Expression of type 'System.Int32' cannot be used for label of type 'System.Object'

And i am unable to use For loop with these installed versions So please let me know what i should do .

--
Thanks & Regards

SOURABH TIWARI

Pekka Klärck

unread,
Nov 16, 2011, 11:48:25 AM11/16/11
to sour...@gmail.com, robotframework-users
2011/11/16 SOURABH TIWARI <sour...@gmail.com>:

>
> I have installed IronPython 2.7 and Python 27 when i tried to execute for
> loop it gave me following error :
>
> Converting argument of FOR IN RANGE failed: ValueError: Expression of type
> 'System.Int32' cannot be used for label of type 'System.Object'
>
> And i am unable to use For loop with these installed versions So please let
> me know what i should do .

This seems to be caused by an IronPython bug similar to this one:
http://ironpython.codeplex.com/workitem/31549

We have added workarounds from some IronPython bugs like this in RF
2.6.3 so you should try that version. Also, you shouldn't get this
error with "normal" Python at all.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Reply all
Reply to author
Forward
0 new messages