Skip to content

[🐛 Bug]: firefox Options raises ResourceWarning #13328

@graingert

Description

@graingert

What happened?

Exception ignored in: <_io.FileIO name='/dev/null' mode='wb' closefd=True>

How can we reproduce the issue?

python -W error
Python 3.11.7+ (main, Dec  7 2023, 08:51:17) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium.webdriver.firefox.options import Options
>>> o = Options()
>>> o.binary = "firefox"
>>> del o
Exception ignored in: <_io.FileIO name='/dev/null' mode='wb' closefd=True>
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ResourceWarning: unclosed file <_io.BufferedWriter name='/dev/null'>


### Relevant log output

```shell
N/A

Operating System

Ubuntu

Selenium version

selenium==4.16.0 python

What are the browser(s) and version(s) where you see this issue?

Firefox

What are the browser driver(s) and version(s) where you see this issue?

GeckDriver

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pyPython BindingsI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions