JSONDecoderError during run empty pyproject
-
I created an empty Qt Quick Application on Qt 6.5.2, then I edit .pyproject as follows:
{ "files": [ "main.py", "main.qml" ], "qmlImportPath": [ "path/to/my/qml/directory" ] }
An exception occurred:
Traceback (most recent call last): File "C:\Users\ASUS\Documents\Qt Project\untitled\venv\Lib\site-packages\PySide6\scripts\project.py", line 240, in <module> project = Project(project_file) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ASUS\Documents\Qt Project\untitled\venv\Lib\site-packages\PySide6\scripts\project.py", line 58, in __init__ self.project = ProjectData(project_file=project_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ASUS\Documents\Qt Project\untitled\venv\Lib\site-packages\PySide6\scripts\project\project_data.py", line 30, in __init__ pyproject = json.load(pyf) ^^^^^^^^^^^^^^ File "C:\Users\ASUS\anaconda3\envs\ml\Lib\json\__init__.py", line 293, in load return loads(fp.read(), ^^^^^^^^^^^^^^^^ File "C:\Users\ASUS\anaconda3\envs\ml\Lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ASUS\anaconda3\envs\ml\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ASUS\anaconda3\envs\ml\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
And when I use Ctrl+z undo what I haved editted, the exception is still consistent.
-
I created an empty Qt Quick Application on Qt 6.5.2, then I edit .pyproject as follows:
{ "files": [ "main.py", "main.qml" ], "qmlImportPath": [ "path/to/my/qml/directory" ] }
An exception occurred:
Traceback (most recent call last): File "C:\Users\ASUS\Documents\Qt Project\untitled\venv\Lib\site-packages\PySide6\scripts\project.py", line 240, in <module> project = Project(project_file) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ASUS\Documents\Qt Project\untitled\venv\Lib\site-packages\PySide6\scripts\project.py", line 58, in __init__ self.project = ProjectData(project_file=project_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ASUS\Documents\Qt Project\untitled\venv\Lib\site-packages\PySide6\scripts\project\project_data.py", line 30, in __init__ pyproject = json.load(pyf) ^^^^^^^^^^^^^^ File "C:\Users\ASUS\anaconda3\envs\ml\Lib\json\__init__.py", line 293, in load return loads(fp.read(), ^^^^^^^^^^^^^^^^ File "C:\Users\ASUS\anaconda3\envs\ml\Lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ASUS\anaconda3\envs\ml\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ASUS\anaconda3\envs\ml\Lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
And when I use Ctrl+z undo what I haved editted, the exception is still consistent.
Have you checked the file; was maybe an UTF8-BOM added or sth similarly weird?
-
Have you checked the file; was maybe an UTF8-BOM added or sth similarly weird?
@friedemannkleint said in JSONDecoderError during run empty pyproject:
Have you checked the file; was maybe an UTF8-BOM added or sth similarly weird?
Yes, BOM caused such a disaster
-
-
-