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 30.0k 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.
    • 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
                                      • 2Play2
                                        2Play @mitu
                                        last edited by 2Play

                                        @mitu I cant find a bad xml
                                        I also replaced few 'Ö' (no other 'Ö', 'ğ', 'Ş', Ç')
                                        re run and get same result. I googled the error:
                                        'ascii' codec can't encode character u'\xd6'
                                        and most pointers relate to how python converts things. And that this was fixed on Python3!
                                        Ive exported full run if helps
                                        https://pastebin.com/11GS3ZS5

                                        Your friend,
                                        2Play!

                                        LolonoisL mituM 2 Replies Last reply Reply Quote 0
                                        • LolonoisL
                                          Lolonois @2Play
                                          last edited by

                                          @2play From the distance: I assume your ~/.emulationsstation/es_systems.cfg contains a non ASCII character (Ö). Have a look there.
                                          If you want to keep your O-umlaut, maybe adding a declaration to the es_systems.cfg is honored by the XML parser(elementree), so add <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> and give it a try.

                                          HTH

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

                                            @2play said in Gamelist Excel export script:

                                            Ive exported full run if helps
                                            https://pastebin.com/11GS3ZS5

                                            Unfortunately that doesn't hint me on what is wrong. Maybe @Lolonois has a point, check the systems' config and make sure it's properly XML formed.
                                            Alternatively, you could try running the script via python3 (instead of just python), but make sure you install the XLSX module with python-pip3 so it's available for python3 also.

                                            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.