Iron Python and Robot Framework Issue

122 views
Skip to first unread message

apap...@bu.edu

unread,
Jun 5, 2018, 9:42:52 AM6/5/18
to robotframework-users
Hi,


I have an Iron Python file "Vitality.py" which I include in my .robot file as a library. So then I want to run this .robot and I type into my command prompt, "ipy -m robot myfile.robot". Unfortunately I get an unhandled exception and it returns this statement:


Traceback (most recent call last):
  File "C:\IronPython.2.7.8\Lib\runpy.py", line 182, in run_module
  File "C:\IronPython.2.7.8\Lib\runpy.py", line 107, in _get_module_details
ImportError: No module named robot


Don't know if this is helpful, but when I open RIDE, and run pybot from there on myfile.robot, it does not recognize the test keywords which I have written in Vitality.py. 



Anyone know what might be the issue?

Pekka Klärck

unread,
Jun 6, 2018, 2:28:17 AM6/6/18
to Andreas Papadakis, robotframework-users
2018-06-05 16:42 GMT+03:00 <apap...@bu.edu>:
>
> I have an Iron Python file "Vitality.py" which I include in my .robot file
> as a library. So then I want to run this .robot and I type into my command
> prompt, "ipy -m robot myfile.robot". Unfortunately I get an unhandled
> exception and it returns this statement:
>
> Traceback (most recent call last):
> File "C:\IronPython.2.7.8\Lib\runpy.py", line 182, in run_module
> File "C:\IronPython.2.7.8\Lib\runpy.py", line 107, in _get_module_details
> ImportError: No module named robot

It seems you haven't installed Robot Framework under IronPython. You
may have installed it under Python, but IronPython doesn't find it
there. You could try configuring your environment to tell IronPython
to look for modules also under Python installation, but probably it's
easiest to just install it under IronPython separately. You can find
more information about this from the installation instructions:
https://github.com/robotframework/robotframework/blob/master/INSTALL.rst

> Don't know if this is helpful, but when I open RIDE, and run pybot from
> there on myfile.robot, it does not recognize the test keywords which I have
> written in Vitality.py.

You libraries need to be in the Python module search path for RIDE to
find them. See the User Guide for details:
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#using-test-libraries
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#module-search-path

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