RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Gamelist Excel export script

    Scheduled Pinned Locked Moved Ideas and Development
    emulationstatioexportgamelist
    126 Posts 19 Posters 34.2k Views
    Loading More Posts
    • 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.
    • M
      mostym
      last edited by mostym

      @mitu Are the gamelist.xml files supposed to be manually created? Here is the es_log.txt contents(I couldn't post here because it's too long) https://pastebin.com/eJgJqk8W

      mituM 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @mostym
        last edited by mitu

        @mostym The gamelist.xml files are created automatically by Emulationstation when you restart/shutdown, they're not created manually. Either way, you don't have them - check the permissions on the folders where they are created and restart ES at least once for them to be created.

        1 Reply Last reply Reply Quote 0
        • M
          mostym
          last edited by

          @mitu What are the permissions supposed to be? Are these set correctly?

          drwxr-xr-x   4 pi   pi    69632 May 24  2018 mame-mame4all
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 markiii
          drwxr-xr-x   2 pi   pi    20480 May 24  2018 mastersystem
          drwxr-xr-x   4 pi   pi     4096 May 24  2018 megadrive
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 megadrive-japan
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 msk2+
          drwxr-xr-x   2 pi   pi    36864 May 24  2018 msx
          drwxr-xr-x   2 pi   pi    20480 May 24  2018 msx2
          drwxr-xr-x   2 pi   pi    36864 May 24  2018 n64
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 nds
          drwxr-xr-x   3 pi   pi    12288 May 31  2018 neogeo
          drwxr-xr-x   8 pi   pi     4096 May 24  2018 nes
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 nesclassic
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 nesh
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 ngp
          drwxr-xr-x   2 pi   pi    16384 May 24  2018 ngpc
          drwxr-xr-x   2 pi   pi    12288 May 24  2018 oddyse
          drwxr-xr-x   5 pi   pi     4096 May 24  2018 Oddysey2
          drwxr-xr-x  45 pi   pi     4096 May 24  2018 pc
          drwxr-xr-x   4 pi   pi     4096 May 31  2018 pcengine
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 pcenginecd
          drwxr-xr-x   3 pi   pi     4096 May 24  2018 playchoice
          drwxr-xr-x   8 pi   pi     4096 May 22  2018 ports
          drwxr-xr-x   2 pi   pi     4096 May 22  2018 psp
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 pspminis
          drwxr-xr-x 112 pi   pi     4096 May 24  2018 psx
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 psx (only use this if you have Scott's PBP set)
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 sc-3000
          drwxr-xr-x  17 pi   pi     4096 May 24  2018 scummvm
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 sega32x
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 segacd
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 sfc
          drwxr-xr-x   5 pi   pi     4096 May 24  2018 sg-1000
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 sgfx
          drwxr-xr-x  10 pi   pi     4096 May 24  2018 snes
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 snesclassic
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 snesh
          drwxr-xr-x   2 pi   pi    94208 May 24  2018 superfamicom
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 tg16
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 tg16cd
          drwxr-xr-x   7 pi   pi     4096 May 24  2018 vectrex
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 vic20
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 videopac
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 videopac2
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 virtualboy
          drwxr-xr-x   3 pi   pi     4096 May 24  2018 vs
          drwxr-xr-x   2 pi   pi    12288 May 24  2018 wonderswan
          drwxr-xr-x   2 pi   pi    12288 May 24  2018 wonderswancolor
          drwxr-xr-x   2 pi   pi     4096 May 24  2018 zmachine
          drwxr-xr-x  60 pi   pi     4096 May 24  2018 zxspectrum
          
          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @mostym
            last edited by

            @mostym The permissions seem to be find on your ROM folders. How did you install your RetroPie system ?

            1 Reply Last reply Reply Quote 0
            • M
              mostym
              last edited by

              @mitu I installed it using rufus and the retropie image.

              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @mostym
                last edited by

                @mostym Well, then beats me - the script will not work if your gamelist.xml are empty, so if you solve that, you'll make it work.

                1 Reply Last reply Reply Quote 0
                • M
                  mostym
                  last edited by

                  @mitu I also just noticed that the PARSE GAMELISTS ONLY option is off. I don't know if that matters or not.

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @mostym
                    last edited by

                    @mostym That's ok, the option tells Emulationstation to ignore the ROMs folders contents and show only what you have registered in gamelist.xml. In your case, that would be nothing, since your files are empty.

                    1 Reply Last reply Reply Quote 0
                    • M
                      mostym
                      last edited by mostym

                      @mitu I see. What about

                       -rwxr-xr-x  1 pi pi   35 May 22  2018 gamelist.xml 
                      

                      is that permission correct?

                      mituM 1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator @mostym
                        last edited by

                        @mostym The permission seems fine. Did you restart at least once Emulationstation since you installed it ? I see in the log the configuration of the controller, which usually happens on the 1st install.

                        1 Reply Last reply Reply Quote 0
                        • M
                          mostym
                          last edited by

                          @mitu I just restarted it, and tried running the script and the same error occurred.

                          mituM 1 Reply Last reply Reply Quote 0
                          • mituM
                            mitu Global Moderator @mostym
                            last edited by

                            @mostym Sorry, but the problem is somewhere else. Did you use the RetroPie supplied image from retropie.org.uk/download or another image ?

                            1 Reply Last reply Reply Quote 0
                            • M
                              mostym
                              last edited by

                              @mitu I downloaded it from the retropie download page, yes.

                              1 Reply Last reply Reply Quote 0
                              • P
                                ppuspfc
                                last edited by

                                I am interested in this work. Congratulations

                                1 Reply Last reply Reply Quote 0
                                • F
                                  FetusSandwich
                                  last edited by

                                  @mitu Hopefully you don't mind me resurrecting this thread, as this was an amazing tool when it was working for me and I think more people in the RetroPie need visibility into your awesome work.

                                  Problem for me now is that: it was working for me, but now it has stopped running, and I'm completely unsure as to why.

                                  Here is the error at the end of the script. It seems to get through all gamelists with no errors, then provides me with:

                                  Traceback (most recent call last):
                                    File "export.py", line 583, in <module>
                                      systems = parse_systems()
                                    File "export.py", line 261, in parse_systems
                                      gamelist = et.parse(gamelist_path)
                                    File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
                                      tree.parse(source, parser)
                                    File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 656, in parse
                                      parser.feed(data)
                                    File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed
                                      self._raiseerror(v)
                                    File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror
                                      raise err
                                  xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 564, column 32
                                  

                                  Any troubleshooting or insight you could provide here would be greatly appreciated. Thanks!

                                  mituM 1 Reply Last reply Reply Quote 0
                                  • mituM
                                    mitu Global Moderator @FetusSandwich
                                    last edited by

                                    @FetusSandwich Run it with --debug and see where it stops. Looks like an issue with a malformed gamelist.xml file.

                                    F 1 Reply Last reply Reply Quote 0
                                    • F
                                      FetusSandwich @mitu
                                      last edited by

                                      @mitu Thanks for your help on this, mitu.

                                      I was indeed able to get this script running eventually and found my way eventually with error logs to the problem child gamelist. What a lifesaver this thing is...

                                      Thanks for the help.

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        bgennette
                                        last edited by bgennette

                                        Just one tiny (or two) things to add ...

                                        You must 'cd' back to the /home/pi/retropie directory to run the 'export.py' script,
                                        otherwise it won't be found.

                                        And speaking of finding ... the list will be at /home/pi/retropie/RetroPie/roms/export_list.xlsx

                                        bye.

                                        2Play2 1 Reply Last reply Reply Quote 0
                                        • 2Play2
                                          2Play @bgennette
                                          last edited by

                                          @mitu
                                          thank you for the py script!

                                          I got from git the latest gamelist.py . i fixed an error found in one list (had &)

                                          my case the error is below

                                          2021-01-27 20:19:47,680 INFO   Exporting to file /home/pi/RetroPie/roms/export_list.xlsx
                                          Traceback (most recent call last):
                                            File "gamelist.py", line 600, in <module>
                                              xlsx_export_workbook(systems, output, collections)
                                            File "gamelist.py", line 416, in xlsx_export_workbook
                                              string="{0} ({1})".format(s.info['fullname'], s.info['name'])
                                          UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in position 1: ordinal not in range(128)
                                          

                                          My locale is all set to US UTF8, latest Raspbian OS updates, pi4

                                          Your friend,
                                          2Play!

                                          mituM 1 Reply Last reply Reply Quote 0
                                          • mituM
                                            mitu Global Moderator @2Play
                                            last edited by mitu

                                            @2play If you provide the offending gamelist.xml, I can attempt to add a fix to the script.

                                            2Play2 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.