Unable to run a Pyside6 application in QtCreator
-
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.9When 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.0I am desperate
- When I launch the designer Qt Creator crash... or I have the message :
-
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.
-
Have you looked at them with Qt Creator's binary editor (Open File With)? - You somehow have invalid characters in there.
-
Have you looked at them with Qt Creator's binary editor (Open File With)? - You somehow have invalid characters in there.
@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