Error: xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1
Unsolved
Qt for Python
-
Hey guys,
i wrote a little application with pyqt5 and it worked fine. But today suddenly i can't run the application. I get the following error:
Traceback (most recent call last): File "C:/Users/hrezaie/Desktop/Hamid Rezaie/GuiApp/GuiApp/app.py", line 768, in <module> w = Fenster() File "C:/Users/hrezaie/Desktop/Hamid Rezaie/GuiApp/GuiApp/app.py", line 29, in __init__ loadUi(r'C:\Users\hrezaie\Desktop\Hamid Rezaie\GuiApp\GuiApp\guiapp.ui', self) File "C:\Users\hrezaie\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyQt5\uic\__init__.py", line 237, in loadUi return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix) File "C:\Users\hrezaie\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyQt5\uic\Loader\loader.py", line 66, in loadUi return self.parse(filename, resource_suffix) File "C:\Users\hrezaie\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyQt5\uic\uiparser.py", line 1020, in parse document = parse(filename) File "C:\Users\hrezaie\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 1202, in parse tree.parse(source, parser) File "C:\Users\hrezaie\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 595, in parse self._root = parser._parse_whole(source) xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1 Process finished with exit code 1
I tryed to solve it but i can't. Has anybody an idea how i can solve it ?
-
Hey guys,
i wrote a little application with pyqt5 and it worked fine. But today suddenly i can't run the application. I get the following error:
Traceback (most recent call last): File "C:/Users/hrezaie/Desktop/Hamid Rezaie/GuiApp/GuiApp/app.py", line 768, in <module> w = Fenster() File "C:/Users/hrezaie/Desktop/Hamid Rezaie/GuiApp/GuiApp/app.py", line 29, in __init__ loadUi(r'C:\Users\hrezaie\Desktop\Hamid Rezaie\GuiApp\GuiApp\guiapp.ui', self) File "C:\Users\hrezaie\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyQt5\uic\__init__.py", line 237, in loadUi return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix) File "C:\Users\hrezaie\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyQt5\uic\Loader\loader.py", line 66, in loadUi return self.parse(filename, resource_suffix) File "C:\Users\hrezaie\AppData\Local\Programs\Python\Python38-32\lib\site-packages\PyQt5\uic\uiparser.py", line 1020, in parse document = parse(filename) File "C:\Users\hrezaie\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 1202, in parse tree.parse(source, parser) File "C:\Users\hrezaie\AppData\Local\Programs\Python\Python38-32\lib\xml\etree\ElementTree.py", line 595, in parse self._root = parser._parse_whole(source) xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1 Process finished with exit code 1
I tryed to solve it but i can't. Has anybody an idea how i can solve it ?
-
@jsulm Hey, no i dont use any XML document. I think the problem is my .ui file. Because if i want to open it with qt designer i get suddenly a error message to.
-
@mrjj hey, unfortunately I didn't solve it in a nice way, but simply recreated the gui again. Afterwards it worked again.