Trouble Installing Robotframework on XP SP3 Machine

29 views
Skip to first unread message

sharp65

unread,
Jul 13, 2010, 9:53:50 AM7/13/10
to robotframework-users
I'm having trouble installing RobotFramework on a windows XP machine
with SP3. I have python installed (version 2.6.5) with the appropriate
values set in the environment variables. When running the
RobotFramework 2.5 installer I get the following error at the very
end:

Traceback (most recent call last):
File "<string>", line 217, in <module>
File "<string>", line 40, in windows_binary_install
File "<string>", line 107, in _get_installation_dir
File "c:\python26\lib\site-packages\robot\__init__.py", line 23, in
<module>
from output import Output, CommandLineMonitor, LOGGER
File "c:\python26\lib\site-packages\robot\output\__init__.py", line
16, in <module>
from output import Output
File "c:\python26\lib\site-packages\robot\output\output.py", line
18, in <module>
from robot.common.statistics import Statistics
File "c:\python26\lib\site-packages\robot\common\__init__.py", line
16, in <module>
from model import BaseTestSuite, BaseTestCase
File "c:\python26\lib\site-packages\robot\common\model.py", line 18,
in <module>
from statistics import Stat
File "c:\python26\lib\site-packages\robot\common\statistics.py",
line 17, in <module>
from robot import utils
File "c:\python26\lib\site-packages\robot\utils\__init__.py", line
25, in <module>
from importing import simple_import, import_
File "c:\python26\lib\site-packages\robot\utils\importing.py", line
18, in <module>
import inspect
File "c:\python26\lib\inspect.py", line 42, in <module>
from collections import namedtuple
File "c:\python26\lib\site-packages\robot\libraries\collections.py",
line 16, in <module>
from robot import utils
ImportError: cannot import name utils

I've tried doing a clean reinstall of python several times but can't
seem to figure this out.

Pekka Klärck

unread,
Jul 13, 2010, 3:46:15 PM7/13/10
to pogr...@gmail.com, robotframework-users
2010/7/13 sharp65 <pogr...@gmail.com>:

> I'm having trouble installing RobotFramework on a windows XP machine
> with SP3. I have python installed (version 2.6.5) with the appropriate
> values set in the environment variables. When running the
> RobotFramework 2.5 installer I get the following error at the very
> end:
>
> Traceback (most recent call last):
>  File "<string>", line 217, in <module>
>  File "<string>", line 40, in windows_binary_install
>  File "<string>", line 107, in _get_installation_dir
>  File "c:\python26\lib\site-packages\robot\__init__.py", line 23, in
> <module>
[snip]

>  File "c:\python26\lib\inspect.py", line 42, in <module>
>    from collections import namedtuple
>  File "c:\python26\lib\site-packages\robot\libraries\collections.py",
> line 16, in <module>
>    from robot import utils
> ImportError: cannot import name utils

The problem seems to be caused by `inspect` module importing
`collections` module (`from collections import namedtuple` in the
above traceback). For some reason this doesn't import the Python
standard module `collections` but instead the Robot Framework standard
test library `Collections`. Python module imports are by default
case-sensitive, but I just learned [1] that there is an environment
variable `PYTHONCASEOK` that can be used to make imports
case-insensitive. Could you check do you have that environment
variable set and possibly remove it?

> I've tried doing a clean reinstall of python several times but can't
> seem to figure this out.

I doubt uninstall removes environment variables so `PYTHONCASEOK`
could still cause this problem. If that's the case, we need to
document this in the installation instructions and also think could we
solve this somehow in the framework itself. In a retrospect
`Collections` was somewhat bad name for this library but renaming it
at this point probably isn't that good idea.

[1] http://www.python.org/dev/peps/pep-0235/

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

sharp65

unread,
Jul 13, 2010, 4:00:37 PM7/13/10
to robotframework-users
Hi Pekka, thanks for getting back to me. I just checked and indeed
their was an environment variable `PYTHONCASEOK'. I deleted it and
then robot framework installed correctly. Thanks for the help!

On Jul 13, 3:46 pm, Pekka Klärck <p...@iki.fi> wrote:
> 2010/7/13 sharp65 <pogro...@gmail.com>:
> Lead Developer of Robot Framework ::http://robotframework.org- Hide quoted text -
>
> - Show quoted text -

Pekka Klärck

unread,
Jul 13, 2010, 4:11:33 PM7/13/10
to pogr...@gmail.com, robotframework-users
2010/7/13 sharp65 <pogr...@gmail.com>:

> Hi Pekka, thanks for getting back to me. I just checked and indeed
> their was an environment variable `PYTHONCASEOK'. I deleted it and
> then robot framework installed correctly. Thanks for the help!

Great that the fix was this simple. I submitted an issue about
documenting that this environment variable should not be set (or
fixing this somehow otherwise):
http://code.google.com/p/robotframework/issues/detail?id=590

Reply all
Reply to author
Forward
0 new messages