Kia Integration - setup problem

:white_check_mark: Login successful! Element found.
An unexpected error occurred: ‘NoneType’ object has no attribute ‘group’
Cleaning up and closing the browser.

same issue

I made some changes to the script. It’s working correctly now. Download it here:

1 Like

Habe auch ein Problem: Login successful aber dann kommt Login successful! Element found. An unexpected error occurred: ‘NoneType’ object has no attribute ‘group’

new version: GitHub - smalarz/kia-token-generator: kia-token-generator

What changed in v2.5

  • No more Selenium / ChromeDriver dependency — uses Chrome’s native DevTools Protocol (CDP) over WebSocket
  • Automatic login detection — detects java.util.NoSuchElementException in the browser and proceeds automatically (no manual confirmation needed)
  • Browser closes automatically — as soon as the authorization code is captured, Chrome closes so it doesn’t cover the terminal output
  • Window stays open — after finishing, the script waits for Enter so the CMD window doesn’t disappear (useful for .exe users)
  • Automatic locale detection — login page language matches your system (override with --locale pl)
  • Dynamic state parameter — no more hardcoded timestamps that could expire
  • Auto-install dependencies — creates a local .venv and installs requests + websocket-client automatically
  • Retry with backoff on token exchange errors (429, timeouts)
  • Works on Windows, macOS, and Linux without extra setup beyond Chrome + Python