Gamelist Excel export script
-
@mitu I installed it using rufus and the retropie image.
-
@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. -
@mitu I also just noticed that the PARSE GAMELISTS ONLY option is off. I don't know if that matters or not.
-
@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. -
-
@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.
-
@mitu I just restarted it, and tried running the script and the same error occurred.
-
@mostym Sorry, but the problem is somewhere else. Did you use the RetroPie supplied image from retropie.org.uk/download or another image ?
-
@mitu I downloaded it from the retropie download page, yes.
-
I am interested in this work. Congratulations
-
@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!
-
@FetusSandwich Run it with
--debug
and see where it stops. Looks like an issue with a malformedgamelist.xml
file. -
@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.
-
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.
-
@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
-
@2play If you provide the offending
gamelist.xml
, I can attempt to add a fix to the script. -
@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 -
@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 thees_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
-
@2play said in Gamelist Excel export script:
Ive exported full run if helps
https://pastebin.com/11GS3ZS5Unfortunately 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 viapython3
(instead of justpython
), but make sure you install the XLSX module withpython-pip3
so it's available forpython3
also. -
@Lolonois & @mitu
First of all a big thank you for your kind replies!
It is an amazing script @mitu-
@Lolonois I have changed the xml header: Not working with python v2
-
@Lolonois You are correct on the Ö. It is in the LÖVE 2d Game Engine system name tag. If I remove command runs fine ( @mitu )
-
@mitu Since I have Python 3.7.3 installed, I did as you advised.
Python 3 works and exports excel list without any changes (no removal of Ö from LÖVE)
So if I may suggest to ppl do below:
Check Python version 2 or 3
python --version or python3 --version
Install Python3 If No Result Above
sudo apt-get install -y python3-dev python3-setuptools
GET MITU GAMELIST LATEST FILE:
wget -O export.py https://gist.githubusercontent.com/cmitu/73cf0783e9e1e4e02d8ce5c44f7a8984/raw/4a7a8176f8b73ee7bc41ec8d884a9820d84ab639/gamelist.py
XLSXWRITER Installation:
git clone --depth=1 https://github.com/jmcnamara/xlsxwriter cd xlsxwriter sudo python3 setup.py install
RUN (normal):
python3 export.py /home/pi/RetroPie/roms/export_list.xlsx
RUN (debug):
python3 export.py /home/pi/RetroPie/roms/export_list.xlsx -d
-
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.