Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with forthcoming RF 2.9 alpha 3 #429

Closed
pekkaklarck opened this issue Jun 17, 2015 · 30 comments
Closed

Incompatibility with forthcoming RF 2.9 alpha 3 #429

pekkaklarck opened this issue Jun 17, 2015 · 30 comments
Labels

Comments

@pekkaklarck
Copy link
Member

That I get this exception when using Selenium2Library with the latest Robot Framework code:

Importing test library 'Selenium2Library' failed: ImportError: cannot import name GLOBAL_VARIABLES
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Selenium2Library/__init__.py", line 2, in <module>
    from keywords import *
  File "/usr/local/lib/python2.7/dist-packages/Selenium2Library/keywords/__init__.py", line 1, in <module>
    from _logging import _LoggingKeywords
  File "/usr/local/lib/python2.7/dist-packages/Selenium2Library/keywords/_logging.py", line 3, in <module>
    from robot.variables import GLOBAL_VARIABLES

Apparently the library uses Robot's internal GLOBAL_VARIABLES that we just we able to remove as part of robotframework/robotframework#532. I don't have time to investigate where and why GLOBAL_VARIABLES are used right now, but I hope the usage could be replaced with something else. I would assume variable related methods in BuiltIn could be used instead. A big benefit of them is that they are part of the public API and thus considered stable.

If it turns out to be hard to fix this on Se2Lib, we can consider adding GLOBAL_VARIABLES back for some time. Our general goal is to get rid of all/most global state like that to make the framework thread safe and easier to parallelize, though.

@pekkaklarck
Copy link
Member Author

Notice that our plan is to get RF 2.9a3 released already tomorrow. I doubt a new Se2Lib version can be released before that. One possibility is that we add GLOBAL_VARIABLES back now, even as an empty dict or similar, and remove it in the next preview release.

@zephraph
Copy link
Member

Um, I can do a minor update with just that in it if you consider it really critical.

@zephraph
Copy link
Member

@pekkaklarck, No changes have went in since the 1.7.0 release, I'm more than willing to push out 1.7.1 with just this in it.

Would that be acceptable to you?

@jussimalinen
Copy link
Member

I added GLOBAL_VARIABLES to robot.variables for backwards compatibility. robotframework/robotframework@75568dd

We would like to remove this in future, so a new release sooner rather than later would still be great.

@emanlove
Copy link
Member

I think a 1.7.1 release would be justified.

@pekkaklarck
Copy link
Member Author

1.7.1 release would be great but now that we added GLOBAL_VARIABLES back it's not urgent. Do you have something else planned for it that should be included? 1.7.1 some time next week would definitely be good enough for us.

@zephraph
Copy link
Member

Well, I've already made the necessary changes. It wasn't actually listed in many places.

I've got other things planned, but there isn't any substantial changes planned until the next major release. 1.7.* stuff from here on in will be mostly documentation and test updates.

@zephraph
Copy link
Member

This is fixed as of #431. I just need to bump the release which I can do in a few hours.

@pekkaklarck
Copy link
Member Author

If creating 1.7.1 is not much work, getting it out ASAP would be awesome. We'll still keep GLOBAL_VARIABLES in RF 2.9a3 to give users some time to upgrade, but we will remove it once a3 is out.

@zephraph
Copy link
Member

I'm working on it now. Having some difficulties with the build process though, I'll get back with you soon.

@zephraph
Copy link
Member

@pekkaklarck, It's done now.

Sorry it took so long, I've been busy with work.

@SteveHarrison82
Copy link

Dear all, in 2.9b2 for the following setup I would like to report the following error:

A. OS: Windows version 7
B. Package installed:
a. Python 2.7.9 :: Anaconda 2.2.0 (64-bit)
b. robotframework-pageobjects==1.3.2
c. robotframework-selenium2library==1.7.1
d. robotframework==2.9b2

On iPython, on importing Page, I get the following error:

In [1]: from robotpageobjects import Page

C:\Users\rramasubramanian\AppData\Local\Continuum\Anaconda\envs\rf29a3\lib\site-packages\robotpageobjects\context.py in ()
5 from robot import api as robot_api
6 from robot.conf import RobotSettings
----> 7 from robot.variables import init_global_variables
8 from robot.errors import DataError
9 from Selenium2Library import Selenium2Library

ImportError: cannot import name init_global_variables

@pekkaklarck
Copy link
Member Author

@rama-bornfree, that seems to be a problem with robotframework-pageobjects. As you can see above, I submitted an issue about RF 2.9 compatibility to its tracker.

@zephraph
Copy link
Member

zephraph commented Jul 6, 2015

Ha, @pekkaklarck, you beat me to it.

@SteveHarrison82
Copy link

@pekka and @ Zephraph, thank you very much for the findings on PO, i will
be more accurate while reporting error

On Monday, July 6, 2015, Zephraph notifications@github.com wrote:

Ha, @pekkaklarck https://github.com/pekkaklarck, you beat me to it.


Reply to this email directly or view it on GitHub
#429 (comment)
.

@vikulin
Copy link

vikulin commented Aug 7, 2015

The issue occurs for selenium RC1 library v2.9.1:
Error in file '/data/edtest/resource/setup.txt': Importing test library 'SeleniumLibrary' failed: ImportError: cannot import name GLOBAL_VARIABLES
Traceback (most recent call last):
File "/usr/jython-2.7-rc3/Lib/site-packages/SeleniumLibrary/init.py", line 24, in
from robot.variables import GLOBAL_VARIABLE

@zephraph
Copy link
Member

zephraph commented Aug 7, 2015

@vikulin, you need to update S2L.

@pekkaklarck
Copy link
Member Author

You are @vikulin still using the old SeleniumLibrary, right? I highly recommend switching to Selenium2Library, but I guess we need to fix this incompatibility in the old and deprecated library too. Issues related to it should be submitted to its tracker, though.

@vikulin
Copy link

vikulin commented Aug 7, 2015

@vikulin
Copy link

vikulin commented Aug 7, 2015

zephraph, S2L update is not an easy task. All RC1 keywords are not compatible with S2L.

@zephraph
Copy link
Member

zephraph commented Aug 7, 2015

Sorry, I looked over the RC1 part.

I don't have any involvement in that project so I won't be any help.

@vikulin
Copy link

vikulin commented Aug 7, 2015

zephraph, I'm not asking you any help.

@alexeylubyanoy
Copy link

Guys, any updates?
Recent version still contains this error.

@zephraph
Copy link
Member

@alexeylubyanoy, recent versions of S2L?

@alexeylubyanoy
Copy link

@zephraph, sorry - I was sure I am posting this to android library repository

@zephraph
Copy link
Member

Haha, no problem.

@AnuchitO
Copy link

Hi all! I still have this problem

$python setup.py install
.......
......
......
$ python test/run_unit_tests.py
Traceback (most recent call last):
  File "test/run_unit_tests.py", line 4, in <module>
    from Selenium2Library import utils
  File "/Users/nong/KATA/robotframework-selenium2library/test/../src/Selenium2Library/__init__.py", line 2, in <module>
    from keywords import *
  File "/Users/nong/KATA/robotframework-selenium2library/test/../src/Selenium2Library/keywords/__init__.py", line 1, in <module>
    from _logging import _LoggingKeywords
  File "/Users/nong/KATA/robotframework-selenium2library/test/../src/Selenium2Library/keywords/_logging.py", line 3, in <module>
    from robot.variables import GLOBAL_VARIABLES
ImportError: cannot import name GLOBAL_VARIABLES

This is pip freeze

appnope==0.1.0
decorator==3.3.2
docutils==0.8.1
gnureadline==6.3.3
ipython==4.1.2
ipython-genutils==0.1.0
path.py==8.1.2
pexpect==4.0.1
pickleshare==0.6
ptyprocess==0.5.1
robotframework==3.0
robotframework-selenium2library==1.5.0
selenium==2.32.0
simplegeneric==0.8.1
traitlets==4.2.1
wheel==0.24.0

@aaltat
Copy link
Contributor

aaltat commented Mar 31, 2016

Your version of Selenium2Library is not compatible with the Robot Framework. This issue is fixed from version 1.7.1 onwards.

@AnuchitO
Copy link

AnuchitO commented Apr 1, 2016

Thank you so much.
I can test pass with version below.

robotframework==2.8.7
robotframework-selenium2library==1.7.4

Could you possibly create requirements.pip?
I don't understand why you would not. ^^

@aaltat
Copy link
Contributor

aaltat commented Apr 1, 2016

There are requirements for pip, but we want and we are keep our backwards compatibility. And therefore the requirements are quite low. But there are few these kind of situations which causes a problem and those could be documented better. If you feel that this is a problem, please raise an separate issue for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants