2024-11-02 18:20:01.835 python[31197:2732361] +[IMKClient subclass]: chose IMKClient_Modern

Getting this message from running Python 3.12.7, Pyside6 6.8.0.2 on MacBook Air M1 with Sequoia 15.0.1.

Best explanation found…

Why This Message Appears

  1. Input Method Kit (IMK):
    • macOS uses the Input Method Kit (IMK) to handle keyboard input and text input methods, including internationalization and other text input scenarios.
    • When a Python application initializes certain GUI frameworks or interacts with the graphical user interface, macOS tries to determine which IMKClient and IMKInputSession subclasses to use for handling input.
  2. IMKClient_Legacy and IMKInputSession_Legacy:
    • The messages indicate that macOS is using legacy versions of IMKClient and IMKInputSession for handling input. This usually happens when the Python process does not fully support or register with the latest macOS input systems.
  3. Python GUI Frameworks:
    • GUI frameworks such as OpenCV, matplotlib, or Tkinter may trigger this log when they create windows or handle user input. This is because they might not be optimized for the latest macOS input system APIs.
  4. Logging Behavior:
    • macOS logs this information for diagnostic purposes, but it does not impact the functionality of your Python script. It’s essentially just informational output.

How to Suppress or Address the Issue

  1. Ignore the Logs:
    • Since these logs do not affect your program’s functionality, the simplest approach is to ignore them.
  2. Suppressing Warnings in Python:
    • If you find the logs annoying, you can suppress such output by setting environment variables or redirecting stderr. For example, you can run your Python script with:
    python -W ignore script.py
    • This will suppress warnings, but may not completely remove these specific logs.

Quick Answer from GPT.
I did not tried python script but, hope this will help thx.

Leave a Reply

The maximum upload file size: 500 MB. You can upload: image, audio, video, document, spreadsheet, interactive, other. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here