Skip to content

Recorder breaks from v4.43.2 -> 'str' object cannot be interpreted as an integer #4059

@vittorio-prodomo

Description

@vittorio-prodomo

I did a quick testing with some different versions of seleniumbase, and apparently from v4.43.2 on this new bug appeared whenever I try to run a very simple command like:

sbase mkrec test_simple.py --url=https://example.com

Once I record a couple of events and then hit c and Enter (in the terminal) to end the recording, I get:

(Recorder) Code-generation exception:
'str' object cannot be interpreted as an integer

And then a bunch of other errors stemming from the fact that the py file was indeed not created and thus not found.

EDIT: I found out that when using v4.43.1 instead, this error is returned as soon as I launch the command, without even starting the recording, and I finally get a more complete stack trace:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\<REDACTED>\venv\Scripts\sbase.exe\__main__.py", line 6, in <module>
    sys.exit(main())
             ~~~~^^
  File "C:\<REDACTED>\venv\Lib\site-packages\seleniumbase\console_scripts\run.py", line 1062, in main
    sb_mkrec.main()
    ~~~~~~~~~~~~~^^
  File "C:\<REDACTED>\venv\Lib\site-packages\seleniumbase\console_scripts\sb_mkrec.py", line 242, in main
    file = open(file_path, "w+", "utf-8")
TypeError: 'str' object cannot be interpreted as an integer

Version 4.43.0 works fine.

My system specs:
OS: Windows 11
Terminal: PowerShell 7.5.3
Python version: 3.13.7
package version: seleniumbase >= 4.43.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUh oh... Something needs to be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions