SeleniumLibrary icon indicating copy to clipboard operation
SeleniumLibrary copied to clipboard

Installing via buildout fails

Open emanlove opened this issue 15 years ago • 4 comments

If you try to install robotframework-selenium2library via buildout it fails on the line

import metadata

due to a weird catch-22 situation. src/SeleniumLibrary/metadata imports in utils which eventually tries to import robot.utils which is part of the robotframework package. buildout is not aware of, at this point and may not need to be aware of, the robotframework egg. I recommend keeping a clean self-enclosed setup.py without a separate metadata.py file.

emanlove avatar Nov 16 '11 19:11 emanlove

Here is a sample test code which shows the problem

create clean python environment using virtualenv

$ virtualenv -p /usr/bin/python2.6 --no-site-packages clean-python-env

clone robotframework-selenium2library repository

$ git clone https://github.com/rtomac/robotframework-selenium2library.git

enter into clean python environment and verify correct python

$ source ~/clean-python-env/bin/activate
(clean-python-env)$ which python
~/clean-python-env/bin/python

finally call setup.py

# python ~/robotframework-selenium2library/setup.py 

which results in the following error

Traceback (most recent call last):
  File "~/robotframework-selenium2library/setup.py", line 9, in <module>
    import metadata
  File "~/robotframework-selenium2library/src/Selenium2Library/metadata.py", line 2, in <module>
    import utils
  File "~/robotframework-selenium2library/src/Selenium2Library/utils/__init__.py", line 3, in <module>
    from browsercache import BrowserCache
  File "~/robotframework-selenium2library/src/Selenium2Library/utils/browsercache.py", line 1, in <module>
    from robot.utils import ConnectionCache
ImportError: No module named robot.utils

This test error example is calling setup.py directly insted of creating a buildout with selenium2 library but results in the exact same error.

emanlove avatar Nov 17 '11 17:11 emanlove

Hi Ed,

Thanks for the great sample script. I am able to reproduce. I will do my best to address this in the next 24 hours.

Ryan

rtomac avatar Nov 22 '11 08:11 rtomac

On 11/22/2011 03:41 AM, Ryan Tomac wrote:

Hi Ed,

Thanks for the great sample script. I am able to reproduce. I will do my best to address this in the next 24 hours.

Ryan


Reply to this email directly or view it on GitHub: https://github.com/rtomac/robotframework-selenium2library/issues/3#issuecomment-2831807

Ryan,

I have a possible solution in my fork, https://github.com/emanlove/robotframework-selenium2library. I forked because, first I am new to git/github and still working out best procedures and because I don't have permission to branch. I can put in a pull request if you like my changes...

Ed

emanlove avatar Nov 22 '11 11:11 emanlove

old issue, your fork was merged but we never closed this issue

j1z0 avatar Feb 12 '12 16:02 j1z0