Skip to content

Bug: ansiToRender crashes #18

@atticus-sullivan

Description

@atticus-sullivan

Before You Begin

Before proceeding, please make sure to follow these steps:

  • I have checked for similar issues in the project's issue tracker.
  • I have searched closed issues to see if a similar problem was reported
    before.

Issue Details

Start by creating a descriptive title for the issue. This helps us understand
the problem quickly.

Description

I get the following stacktrace

  File ".../venv/lib/python3.12/site-packages/ansitoimg/render.py", line 141, in _doGrabWebpage
    install(p.chromium)
  File ".../venv/lib/python3.12/site-packages/install_playwright/__init__.py", line 43, in install
    args: list[str] = [driver_executable, driver_cli, "install"] + [bt.name for bt in browser_types]
                                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'BrowserType' object is not iterable

Looking at it in more detail it seems like the install_playwright module changed some part of its API a while ago (see eggplants/install-playwright-python@9b018a6) which causes the install Function to expect an iterable instead of a simple scalar (just wrapping in a list should be fine though).

Expected Behavior

It should not crash.

Actual Behavior

Running a script using ansiToRender crashes

System Information

Please provide the following additional information about your system or
environment:

Ubuntu 24.4 (but I run this in a GitHub workflow/CI with runs-on: ubuntu-latest )

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions