Skip to content

commit dfab927 contains a reference to basestring, which is not in Python 3 #1820

Description

@madeleineth

OS: Ubuntu 14.04
Selenium Version: 2.53.0
Browser: Firefox
Browser Version: 45.0+build2-0ubuntu0.14.04.1

It looks like commit dfab927 introduced a reference to basestring, which does not exist in Python 3.4.3.

With Dockerfile:

FROM ubuntu:trusty
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -qq
RUN apt-get install -qq build-essential python3-pip
RUN apt-get install -qq firefox
RUN pip3 install -U selenium
RUN pip3 list
COPY repro.py /seleniumtest/
CMD /seleniumtest/repro.py

And this repro.py mode 755:

#!/usr/bin/python3
from selenium import webdriver
webdriver.Firefox()

Run:

docker build -t repro .
docker run -t -i  repro

And see:

Traceback (most recent call last):
  File "/seleniumtest/repro.py", line 3, in <module>
    webdriver.Firefox()
  File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/firefox/webdriver.py", line 62, in __init__
    firefox_options.binary_location = self.binary if isinstance(self.binary, basestring) else self.binary._get_firefox_start_cmd()
NameError: name 'basestring' is not defined

...which wasn't happening yesterday, before the release of 2.53.0.

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