Skip to content

CLI always log warning Failed to init ClientTransaction #69

Description

@yjl9903

Version

0.8.6

Operating System

macOS

Browser (for cookie extraction)

Edge

Access Method

Local terminal

What happened?

CLI always log warning, and it will break json output:

WARNING twitter_cli.client: Failed to init ClientTransaction: 'NoneType' object has no attribute 'group'

Expected behavior

Fix the issue or change this warning to debug

Steps to reproduce

$ twitter search 'xxx' -t Latest --max 30 --json
WARNING twitter_cli.client: Failed to init ClientTransaction: 'NoneType' object has no attribute 'group'
{
  "ok": true,
  "schema_version": "1",
  "data": []
}



$ twitter -v search 'xxx' -t Latest --max 30 --json
DEBUG twitter_cli.auth: Attempting browser cookie extraction
DEBUG twitter_cli.auth: arc in-process extraction failed: Failed to find cookies for Arc browser
INFO twitter_cli.auth: Extracted 12 total cookies for full browser fingerprint
INFO twitter_cli.auth: Found cookies in chrome profile 'Default' (in-process)
INFO twitter_cli.client: curl_cffi impersonating chrome133a
DEBUG twitter_cli.auth: Verifying Twitter cookies with full forwarded cookie header
DEBUG twitter_cli.auth: Verification endpoint https://api.x.com/1.1/account/verify_credentials.json returned HTTP 404, trying next...
DEBUG twitter_cli.auth: Verification endpoint https://x.com/i/api/1.1/account/settings.json returned HTTP 404, trying next...
INFO twitter_cli.auth: Cookie verification skipped (attempts: verify_credentials.json=404, settings.json=404), will verify on first API call
WARNING twitter_cli.client: Failed to init ClientTransaction: 'NoneType' object has no attribute 'group'
DEBUG twitter_cli.client: Timeline page returned no tweets but exposed next cursor; continuing pagination
DEBUG twitter_cli.client: Sleeping 1.8s between requests
{
  "ok": true,
  "schema_version": "1",
  "data": []
}

Diagnostics


Error output / logs


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