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

Incompatibility with pywin32

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.5.0, 6.4.3
    • 6.4.2
    • PySide, Shiboken
    • None
    • Windows
    • 60e9009f6 (dev), ae6d26def (6.4)

    Description

      I get an exception in 6.4.2, but not in 6.4.1

       

      Minimal reproducible example:

      from PySide6.QtWidgets import QApplication
      import pythoncom 

      Traceback:

      Traceback (most recent call last):
        File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 330, in find_cookie
          line_string = line.decode('utf-8')
      UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byteDuring handling of the above exception, another exception occurred:Traceback (most recent call last):
        File "C:\Users\username\AppData\Roaming\JetBrains\PyCharmCE2022.3\scratches\scratch_39.py", line 2, in <module>
          import pythoncom
        File "D:\PythonProjekte\appname\venv\lib\site-packages\pythoncom.py", line 2, in <module>
          import pywintypes
        File "shibokensupport/signature/loader.py", line 61, in feature_imported
        File "shibokensupport/feature.py", line 137, in feature_imported
        File "shibokensupport/feature.py", line 148, in _mod_uses_pyside
        File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\inspect.py", line 997, in getsource
          lines, lnum = getsourcelines(object)
        File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\inspect.py", line 979, in getsourcelines
          lines, lnum = findsource(object)
        File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\inspect.py", line 794, in findsource
          lines = linecache.getlines(file, module.__dict__)
        File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\linecache.py", line 47, in getlines
          return updatecache(filename, module_globals)
        File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\linecache.py", line 136, in updatecache
          with tokenize.open(fullname) as fp:
        File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 394, in open
          encoding, lines = detect_encoding(buffer.readline)
        File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 371, in detect_encoding
          encoding = find_cookie(first)
        File "C:\Users\username\AppData\Local\Programs\Python\Python38\lib\tokenize.py", line 335, in find_cookie
          raise SyntaxError(msg)
      SyntaxError: invalid or missing encoding declaration for 'D:\\PythonProjekte\\appname\\venv\\lib\\site-packages\\pywin32_system32\\pywintypes38.dll'Process finished with exit code 1 

      Attachments

        Issue Links

          For Gerrit Dashboard: PYSIDE-2189
          # Subject Branch Project Status CR V

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              ad_ ad_
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes