Skip to content

support robot 5.0 #1752

Closed
Closed

Description

@DetachHead
import SeleniumLibrary
(.venv) C:\Users\user\project>c:/Users/user/project/.venv/Scripts/python.exe c:/Users/user/project/Sandpit/test.py
Traceback (most recent call last):
  File "c:\Users\user\project\Sandpit\test.py", line 52, in <module>
    import SeleniumLibrary
  File "c:\Users\user\project\.venv\lib\site-packages\SeleniumLibrary\__init__.py", line 33, in <module>
    from SeleniumLibrary.keywords import (
  File "c:\Users\user\project\.venv\lib\site-packages\SeleniumLibrary\keywords\__init__.py", line 18, in <module>
    from .browsermanagement import BrowserManagementKeywords  # noqa
  File "c:\Users\user\project\.venv\lib\site-packages\SeleniumLibrary\keywords\browsermanagement.py", line 30, in <module>
    from .webdrivertools import WebDriverCreator
  File "c:\Users\user\project\.venv\lib\site-packages\SeleniumLibrary\keywords\webdrivertools\__init__.py", line 17, in <module>
    from .webdrivertools import WebDriverCreator  # noqa
  File "c:\Users\user\project\.venv\lib\site-packages\SeleniumLibrary\keywords\webdrivertools\webdrivertools.py", line 25, in <module>
    from robot.utils import ConnectionCache, StringIO
ImportError: cannot import name 'StringIO' from 'robot.utils' (c:\Users\user\project\.venv\lib\site-packages\robot\utils\__init__.py)

my understanding is that StringIO has been removed in 5.0 robotframework/robotframework#4150

Activity

  1. pekkaklarck commented on Dec 7, 2021

    @pekkaklarck
    Member

    Good catch! I now added robot.utils.StringIO back to avoid breaking old SL versions, but that usage should definitely be removed.

  2. pekkaklarck commented on Jan 27, 2022

    @pekkaklarck
    Member

    Ping @emanlove! SL should stop using robot.utils.StringIO and use io.StrinIO instead. The former is effectively deprecated and will be removed in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions