Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2105

[Windows] setProcessDpiAwarenessContext failed after importing pyautogui

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.4.1
    • 6.4.0.1
    • PySide
    • None
    • Windows 10 21H2
    • Windows
    • 19857fda75d049e64e39ff353d7f5ed3bd342d61

    Description

       
      Here'a small example code that raises a warning when run in the Python interpreter

      """
      QtWarningMsg:
      setProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) failed:
      COM error 0x5  (Access is denied.)
      """
      import pyautogui  # noqa # pylint:disable=unused-import
      from PySide6.QtWidgets import QApplication
      QApplication()
      

      Related analysis can be found in https://github.com/asweigart/pyautogui/issues/663

      Why I am reporting this here is to consider if this warning should be silenced (if it is not an issue at all) or whether the warning text should be improved (ACCESS_DENIED is something like "setProcessDpiAwarenessContext has been called before, most likely by another module").

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              bers bers bers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes