Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Unable to run a Pyside6 application in QtCreator

Unable to run a Pyside6 application in QtCreator

Scheduled Pinned Locked Moved Solved Qt for Python
7 Posts 3 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JM baubetJ Offline
    JM baubetJ Offline
    JM baubet
    wrote on last edited by JM baubet
    #1

    I'm on MAC OS 13.1 (Ventura)
    I have a Python QML application in QT 6.4.1 QT Creator 9.0.1, python 3.9

    When I want to run my application I get the following message during compilation.

    Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PySide6/scripts/project.py", line 227, in <module>
    project = Project(project_file)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PySide6/scripts/project.py", line 55, in init
    self.project = ProjectData(project_file=project_file)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PySide6/scripts/project/project_data.py", line 30, in init
    pyproject = json.load(pyf)
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/init.py", line 293, in load
    return loads(fp.read(),
    File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb0 in position 37: invalid start byte
    22:02:29: The process "/Library/Frameworks/Python.framework/Versions/3.9/bin/pyside6-project" exited with code 1.
    Error while building/deploying project MyCalendar (kit: Qt 6.4.1 for macOS)
    When executing step "Run PySide6 project tool"
    22:02:29: Elapsed time: 00:00.

    I have the same message when I run QML preview.

    • When I launch the designer Qt Creator crash... or I have the message :
      Cannot open this QML document because of an error in the QML file:
      Line: 0: The Design Mode requires a valid Qt kit

    My code is running by the command 'python3 main.py'

    I suspect a problem in my QTCreator environment, but I can't find anything wrong.
    I already reinstalled all Qt without any change, I also tried with QTCreator 9.0.0

    I am desperate

    1 Reply Last reply
    0
    • F Offline
      F Offline
      friedemannkleint
      wrote on last edited by
      #2

      How did you create your files? It seems there is an invalid character (0xb0 / Vertical tab) in your project file which causes the JSON loader to throw. The project file should be UTF-8, or better, plain ASCII , as should the source file names. Similar for the .qml files.

      1 Reply Last reply
      0
      • JM baubetJ Offline
        JM baubetJ Offline
        JM baubet
        wrote on last edited by
        #3

        I create my files with QtCreator.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          friedemannkleint
          wrote on last edited by
          #4

          Have you looked at them with Qt Creator's binary editor (Open File With)? - You somehow have invalid characters in there.

          JM baubetJ 1 Reply Last reply
          0
          • F friedemannkleint

            Have you looked at them with Qt Creator's binary editor (Open File With)? - You somehow have invalid characters in there.

            JM baubetJ Offline
            JM baubetJ Offline
            JM baubet
            wrote on last edited by
            #5

            @friedemannkleint I never edited the files with any other editor

            I looked at the files with a Hexa editor and I can't find the character 0xb0

            1 Reply Last reply
            0
            • JM baubetJ Offline
              JM baubetJ Offline
              JM baubet
              wrote on last edited by
              #6

              I have partially solved my problem.
              When I create projects on my removable disk, nothing works. If I create the project on the main disk everything works normally.

              I have to find out why...

              1 Reply Last reply
              0
              • A Offline
                A Offline
                AMenard
                wrote last edited by
                #7

                I know this post is old, but in my case when I got this error, I was missing the tomlkit module in my python installation.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved