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. Error: xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1
Forum Updated to NodeBB v4.3 + New Features

Error: xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 1

Scheduled Pinned Locked Moved Unsolved Qt for Python
8 Posts 3 Posters 6.3k Views 1 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.
  • E Offline
    E Offline
    elias_hh
    wrote on 20 Jul 2020, 09:05 last edited by
    #1

    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 ?

    J 1 Reply Last reply 20 Jul 2020, 09:19
    0
    • E elias_hh
      20 Jul 2020, 09:05

      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 ?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 20 Jul 2020, 09:19 last edited by
      #2

      @elias_hh Are you parsing a XML document in your app? Is this document still valid XML?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 1 Reply Last reply 20 Jul 2020, 09:21
      0
      • J jsulm
        20 Jul 2020, 09:19

        @elias_hh Are you parsing a XML document in your app? Is this document still valid XML?

        E Offline
        E Offline
        elias_hh
        wrote on 20 Jul 2020, 09:21 last edited by
        #3

        @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.
        Unbenannt.PNG

        J 1 Reply Last reply 20 Jul 2020, 09:23
        0
        • E elias_hh
          20 Jul 2020, 09:21

          @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.
          Unbenannt.PNG

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 20 Jul 2020, 09:23 last edited by
          #4

          @elias_hh So, check the content of that ui file

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • E Offline
            E Offline
            elias_hh
            wrote on 20 Jul 2020, 09:40 last edited by elias_hh
            #5

            @jsulm i ifix the problen, thank u.

            M 1 Reply Last reply 20 Jul 2020, 11:44
            0
            • E elias_hh
              20 Jul 2020, 09:40

              @jsulm i ifix the problen, thank u.

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 20 Jul 2020, 11:44 last edited by
              #6

              @elias_hh
              Hi
              What was it ? Just so others might also be able to fix it.

              E 1 Reply Last reply 20 Jul 2020, 12:05
              0
              • M mrjj
                20 Jul 2020, 11:44

                @elias_hh
                Hi
                What was it ? Just so others might also be able to fix it.

                E Offline
                E Offline
                elias_hh
                wrote on 20 Jul 2020, 12:05 last edited by
                #7

                @mrjj hey, unfortunately I didn't solve it in a nice way, but simply recreated the gui again. Afterwards it worked again.

                M 1 Reply Last reply 20 Jul 2020, 12:11
                1
                • E elias_hh
                  20 Jul 2020, 12:05

                  @mrjj hey, unfortunately I didn't solve it in a nice way, but simply recreated the gui again. Afterwards it worked again.

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 20 Jul 2020, 12:11 last edited by
                  #8

                  @elias_hh
                  well still a solution. :) thank you.

                  1 Reply Last reply
                  1

                  4/8

                  20 Jul 2020, 09:23

                  • Login

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