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. pyside6-project.exe existed with code 1
Qt 6.11 is out! See what's new in the release blog

pyside6-project.exe existed with code 1

Scheduled Pinned Locked Moved Solved Qt for Python
9 Posts 4 Posters 3.2k Views 2 Watching
  • 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.
  • CKurduC Offline
    CKurduC Offline
    CKurdu
    wrote on last edited by CKurdu
    #1

    Qt Creator can't build my project. But when I run the app from the console, it works as expected.

    I tried to remove pycache and clean and rebuild. It didn't work.

    I believe there is another cache somewhere that I need to clean but I don't know.

    05:42:48: Starting: "D:\uprojects\projects\self\qt-for-python\pyside6\Scripts\pyside6-project.exe" build
    Traceback (most recent call last):
      File "D:\uprojects\projects\self\qt-for-python\pyside6\Lib\site-packages\PySide6\scripts\metaobjectdump.py", line 389, in <module>
        json_data = parse_file(file, context, args.suppress_file)
      File "D:\uprojects\projects\self\qt-for-python\pyside6\Lib\site-packages\PySide6\scripts\metaobjectdump.py", line 349, in parse_file
        visitor.visit(ast_tree)
      File "F:\bin\python\python397\lib\ast.py", line 407, in visit
        return visitor(node)
      File "F:\bin\python\python397\lib\ast.py", line 415, in generic_visit
        self.visit(item)
      File "F:\bin\python\python397\lib\ast.py", line 407, in visit
        return visitor(node)
      File "D:\uprojects\projects\self\qt-for-python\pyside6\Lib\site-packages\PySide6\scripts\metaobjectdump.py", line 320, in visit_ImportFrom
        self._handle_import(node.module)
      File "D:\uprojects\projects\self\qt-for-python\pyside6\Lib\site-packages\PySide6\scripts\metaobjectdump.py", line 324, in _handle_import
        dot = mod.index(".")
    ValueError: substring not found
    JSONDecodeError: running pyside6-metaobjectdump on D:\uprojects\projects\self\progressive_memory\packages\Helpers\main.py: Expecting value: line 1 column 1 (char 0)
    05:42:49: The process "D:\uprojects\projects\self\qt-for-python\pyside6\Scripts\pyside6-project.exe" exited with code 1.
    Error while building/deploying project Helpers (kit: Desktop Qt 6.4.2 MSVC2019 64bit)
    When executing step "Run PySide6 project tool"
    

    You reap what you sow it

    SGaistS 1 Reply Last reply
    0
    • CKurduC CKurdu

      Qt Creator can't build my project. But when I run the app from the console, it works as expected.

      I tried to remove pycache and clean and rebuild. It didn't work.

      I believe there is another cache somewhere that I need to clean but I don't know.

      05:42:48: Starting: "D:\uprojects\projects\self\qt-for-python\pyside6\Scripts\pyside6-project.exe" build
      Traceback (most recent call last):
        File "D:\uprojects\projects\self\qt-for-python\pyside6\Lib\site-packages\PySide6\scripts\metaobjectdump.py", line 389, in <module>
          json_data = parse_file(file, context, args.suppress_file)
        File "D:\uprojects\projects\self\qt-for-python\pyside6\Lib\site-packages\PySide6\scripts\metaobjectdump.py", line 349, in parse_file
          visitor.visit(ast_tree)
        File "F:\bin\python\python397\lib\ast.py", line 407, in visit
          return visitor(node)
        File "F:\bin\python\python397\lib\ast.py", line 415, in generic_visit
          self.visit(item)
        File "F:\bin\python\python397\lib\ast.py", line 407, in visit
          return visitor(node)
        File "D:\uprojects\projects\self\qt-for-python\pyside6\Lib\site-packages\PySide6\scripts\metaobjectdump.py", line 320, in visit_ImportFrom
          self._handle_import(node.module)
        File "D:\uprojects\projects\self\qt-for-python\pyside6\Lib\site-packages\PySide6\scripts\metaobjectdump.py", line 324, in _handle_import
          dot = mod.index(".")
      ValueError: substring not found
      JSONDecodeError: running pyside6-metaobjectdump on D:\uprojects\projects\self\progressive_memory\packages\Helpers\main.py: Expecting value: line 1 column 1 (char 0)
      05:42:49: The process "D:\uprojects\projects\self\qt-for-python\pyside6\Scripts\pyside6-project.exe" exited with code 1.
      Error while building/deploying project Helpers (kit: Desktop Qt 6.4.2 MSVC2019 64bit)
      When executing step "Run PySide6 project tool"
      
      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Just for testing, can you try to move your project in a folder that does not contain "self" in its path ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      JonBJ CKurduC 2 Replies Last reply
      0
      • SGaistS SGaist

        Hi,

        Just for testing, can you try to move your project in a folder that does not contain "self" in its path ?

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #3

        @SGaist said in pyside6-project.exe existed with code 1:

        that does not contain "self" in its path ?

        Nah, surely not...?!

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Just for testing, can you try to move your project in a folder that does not contain "self" in its path ?

          CKurduC Offline
          CKurduC Offline
          CKurdu
          wrote on last edited by
          #4

          hi @SGaist ,

          On my Linux, it is working from a path that doesn't contain a directory of 'self'. It gives the same error.

          ValueError: substring not found
          JSONDecodeError: running pyside6-metaobjectdump on /home/ckurdu/Projects/Qt/pyside6/progressive_memory/packages/Helpers/main.py: Expecting value: line 1 column 1 (char 0)
          

          The text encoding of main.py is "utf-8 without bom"

          You reap what you sow it

          CKurduC 1 Reply Last reply
          0
          • CKurduC CKurdu

            hi @SGaist ,

            On my Linux, it is working from a path that doesn't contain a directory of 'self'. It gives the same error.

            ValueError: substring not found
            JSONDecodeError: running pyside6-metaobjectdump on /home/ckurdu/Projects/Qt/pyside6/progressive_memory/packages/Helpers/main.py: Expecting value: line 1 column 1 (char 0)
            

            The text encoding of main.py is "utf-8 without bom"

            CKurduC Offline
            CKurduC Offline
            CKurdu
            wrote on last edited by
            #5

            I realized that "from Pyside6 import QtCore" making this happen. I don't remember when I added this line. When we create a python class from Qt Creator, it adds this line automatically. Maybe I copied and pasted it wrongly to the main.py.

            But why this line creates this problem, I don't know.

            You reap what you sow it

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

              Can you please paste a minimal Python code snippet that causes pyside6-metaobjectdump to fail?

              CKurduC 1 Reply Last reply
              1
              • F friedemannkleint

                Can you please paste a minimal Python code snippet that causes pyside6-metaobjectdump to fail?

                CKurduC Offline
                CKurduC Offline
                CKurdu
                wrote on last edited by CKurdu
                #7

                Hello @friedemannkleint

                You can create a normal python Qt Qml app and add the below line

                from PySide6 import QtCore
                

                Full code

                # This Python file uses the following encoding: utf-8
                import sys
                from pathlib import Path
                
                from PySide6 import QtCore
                from PySide6.QtGui import QGuiApplication
                from PySide6.QtQml import QQmlApplicationEngine
                
                
                if __name__ == "__main__":
                    app = QGuiApplication(sys.argv)
                    engine = QQmlApplicationEngine()
                    qml_file = Path(__file__).resolve().parent / "main.qml"
                    engine.load(qml_file)
                    if not engine.rootObjects():
                        sys.exit(-1)
                    sys.exit(app.exec())
                
                

                You reap what you sow it

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

                  Thanks, we can fix this.

                  CKurduC 1 Reply Last reply
                  0
                  • F friedemannkleint

                    Thanks, we can fix this.

                    CKurduC Offline
                    CKurduC Offline
                    CKurdu
                    wrote on last edited by
                    #9

                    @friedemannkleint
                    You're welcome.

                    You reap what you sow it

                    1 Reply Last reply
                    0
                    • CKurduC CKurdu has marked this topic as solved on

                    • Login

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