Skip to content

Missing playwright #338

@rinkmi1

Description

@rinkmi1

Description of the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Ran the command pytr ....

Expected behavior
A clear and concise description of what you expected to happen.

functional login.

Error log

15:38:20 Initiating web login...
15:38:20 Retrieving AWS WAF token using Playwright...
15:38:20 Failed to get AWS WAF token. Try running "playwright install chromium"
Traceback (most recent call last):
  File "/Users/michael/.local/bin/pytr", line 6, in <module>
    sys.exit(main())
             ~~~~^^
  File "/Users/michael/.local/pipx/venvs/pytr/lib/python3.14/site-packages/pytr/main.py", line 443, in main
    login(
    ~~~~~^
        phone_no=args.phone_no,
        ^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
        waf_token=args.waf_token,
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/michael/.local/pipx/venvs/pytr/lib/python3.14/site-packages/pytr/account.py", line 60, in login
    countdown = tr.initiate_weblogin()
  File "/Users/michael/.local/pipx/venvs/pytr/lib/python3.14/site-packages/pytr/api.py", line 198, in initiate_weblogin
    self._waf_token = self._fetch_waf_token_playwright()
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/Users/michael/.local/pipx/venvs/pytr/lib/python3.14/site-packages/pytr/api.py", line 140, in _fetch_waf_token_playwright
    browser = p.chromium.launch(
        headless=True,
        args=["--no-sandbox", "--disable-setuid-sandbox"],
    )
  File "/Users/michael/.local/pipx/venvs/pytr/lib/python3.14/site-packages/playwright/sync_api/_generated.py", line 14566, in launch
    self._sync(
    ~~~~~~~~~~^
        self._impl_obj.launch(
        ^^^^^^^^^^^^^^^^^^^^^^
    ...<16 lines>...
        )
        ^
    )
    ^
  File "/Users/michael/.local/pipx/venvs/pytr/lib/python3.14/site-packages/playwright/_impl/_sync_base.py", line 115, in _sync
    return task.result()
           ~~~~~~~~~~~^^
  File "/Users/michael/.local/pipx/venvs/pytr/lib/python3.14/site-packages/playwright/_impl/_browser_type.py", line 97, in launch
    await self._channel.send(
        "launch", TimeoutSettings.launch_timeout, params
    )
  File "/Users/michael/.local/pipx/venvs/pytr/lib/python3.14/site-packages/playwright/_impl/_connection.py", line 69, in send
    return await self._connection.wrap_api_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/Users/michael/.local/pipx/venvs/pytr/lib/python3.14/site-packages/playwright/_impl/_connection.py", line 559, in wrap_api_call
    raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.Error: BrowserType.launch: Executable doesn't exist at /Users/michael/Library/Caches/ms-playwright/chromium_headless_shell-1208/chrome-headless-shell-mac-arm64/chrome-headless-shell
╔════════════════════════════════════════════════════════════╗
║ Looks like Playwright was just installed or updated.       ║
║ Please run the following command to download new browsers: ║
║                                                            ║
║     playwright install                                     ║
║                                                            ║
║ <3 Playwright Team                                         ║
╚════════════════════════════════════════════════════════════╝

Environment

installed python via brew
used pipx to install/upgrade pytr
cookies were already deleted

  • OS: macOS
  • pytr version: 0.48

Additional context
The playwright dependency was installed but not in the cache-folder.
After running

playwright install  

it worked, but not out of the box, which should be the intended behaviour or did I do something wrong with my python installation?

Metadata

Metadata

Assignees

No one assigned

    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